R
Ramon F Herrera
When a jDialog is created, the calling class sets in advance
the place where the new windows should appear (see code below).
The original window, however, is sort of "parent-less", so how
can I specify the root window's location?
Thanks,
-Ramon F. Herrera
ps: the code below was automatically generated
by JBuilder's IDE.
-------------------------------------------------------------------------
//Help | About action performed
public void jMenuHelpAbout_actionPerformed(ActionEvent e) {
Frame1_AboutBox dlg = new Frame1_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.pack();
dlg.show();
}
the place where the new windows should appear (see code below).
The original window, however, is sort of "parent-less", so how
can I specify the root window's location?
Thanks,
-Ramon F. Herrera
ps: the code below was automatically generated
by JBuilder's IDE.
-------------------------------------------------------------------------
//Help | About action performed
public void jMenuHelpAbout_actionPerformed(ActionEvent e) {
Frame1_AboutBox dlg = new Frame1_AboutBox(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation( (frmSize.width - dlgSize.width) / 2 + loc.x,
(frmSize.height - dlgSize.height) / 2 + loc.y);
dlg.setModal(true);
dlg.pack();
dlg.show();
}