buttonPn.add(mCloseButton = new JButton(Localizer.getLocalization(Localizer.I18N_CLOSE)));
mCloseButton.addActionListener(this);
mDialog.getRootPane().setDefaultButton(mCloseButton);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Window vaterWindow = mDialog.getOwner();
Point vaterLocation = vaterWindow.getLocation();
Dimension vaterSize = vaterWindow.getSize();
// Preferred
Point hilfeLocation = new Point(vaterLocation.x + vaterSize.width, vaterLocation.y);
Dimension hilfeSize = new Dimension(screenSize.width - hilfeLocation.x, vaterSize.height);
// check if size is OK
if (hilfeSize.width < MIN_HELP_DIALOG_SIZE.width) {
hilfeSize.width = MIN_HELP_DIALOG_SIZE.width;
hilfeLocation.x = screenSize.width - hilfeSize.width;
// does not fit beside -> move parent window to the left
vaterLocation.x = screenSize.width - MIN_HELP_DIALOG_SIZE.width - vaterSize.width;
if (vaterLocation.x < 10) {
vaterLocation.x = 10;
}
vaterWindow.setLocation(vaterLocation);
}
if (hilfeSize.width > MAX_HELP_DIALOG_SIZE.width) {
hilfeSize.width = MAX_HELP_DIALOG_SIZE.width;
}
if (hilfeSize.height < MIN_HELP_DIALOG_SIZE.height) {