mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 14:08:38 -05:00
Force toFront and requestFocus to bring windows to front
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1804 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
299fac9c8e
commit
4ac9ad241b
@ -117,6 +117,8 @@ public class AcceptCertificateDialog extends JDialog {
|
||||
getToolkit().getScreenSize().height / 2 -
|
||||
getSize().height / 2);
|
||||
setVisible(true);
|
||||
toFront();
|
||||
requestFocus();
|
||||
}
|
||||
|
||||
protected JPanel getButtonPanel() {
|
||||
|
@ -134,6 +134,7 @@ public class NotificationDialog extends JDialog {
|
||||
getSize().height / 2);
|
||||
bodyField.requestFocus();
|
||||
setVisible(true);
|
||||
toFront();
|
||||
requestFocus();
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,7 @@ public class PasswordPromptDialog extends JDialog {
|
||||
getToolkit().getScreenSize().height / 2 -
|
||||
getSize().height / 2);
|
||||
setVisible(true);
|
||||
toFront();
|
||||
requestFocus();
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,7 @@ public class SelectCertificateDialog extends JDialog {
|
||||
getToolkit().getScreenSize().height / 2 -
|
||||
getSize().height / 2);
|
||||
setVisible(true);
|
||||
toFront();
|
||||
requestFocus();
|
||||
}
|
||||
|
||||
|
@ -148,6 +148,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
|
||||
public void run() {
|
||||
aboutFrame.update();
|
||||
aboutFrame.setVisible(true);
|
||||
aboutFrame.toFront();
|
||||
aboutFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -160,6 +162,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
|
||||
public void run() {
|
||||
settingsFrame.reload();
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -273,6 +277,8 @@ public class AwtGatewayTray implements DavGatewayTrayInterface {
|
||||
// display settings frame on first start
|
||||
if (Settings.isFirstStart()) {
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
|
||||
public void run() {
|
||||
aboutFrame.update();
|
||||
aboutFrame.setVisible(true);
|
||||
aboutFrame.toFront();
|
||||
aboutFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -156,6 +158,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
|
||||
public void run() {
|
||||
settingsFrame.reload();
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -312,6 +316,8 @@ public class FrameGatewayTray implements DavGatewayTrayInterface {
|
||||
// display settings frame on first start
|
||||
if (Settings.isFirstStart()) {
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -234,6 +234,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
||||
}
|
||||
aboutFrame.update();
|
||||
aboutFrame.setVisible(true);
|
||||
aboutFrame.toFront();
|
||||
aboutFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -250,8 +252,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
||||
}
|
||||
settingsFrame.reload();
|
||||
settingsFrame.setVisible(true);
|
||||
// workaround for focus on first open
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -271,8 +273,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
||||
}
|
||||
settingsFrame.reload();
|
||||
settingsFrame.setVisible(true);
|
||||
// workaround for focus on first open
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -321,6 +323,8 @@ public class SwtGatewayTray implements DavGatewayTrayInterface {
|
||||
settingsFrame = new SettingsFrame();
|
||||
}
|
||||
settingsFrame.setVisible(true);
|
||||
settingsFrame.toFront();
|
||||
settingsFrame.requestFocus();
|
||||
}
|
||||
|
||||
synchronized (mainThread) {
|
||||
|
Loading…
Reference in New Issue
Block a user