aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/security/SecurityDialog.java
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-01-10 17:57:19 +0100
committerJiri Vanek <[email protected]>2013-01-10 17:57:19 +0100
commitf38ac428ba5289313c21623a267cedcde554bf95 (patch)
tree52b6c8479ef829b867ba4b2abaa985085a8aa414 /netx/net/sourceforge/jnlp/security/SecurityDialog.java
parent5d5ba9ba1d34ae35503ba016ceaabab2afe7fefe (diff)
All IcedTea-Web dialogues are centered to middle of active screen
Active screen in this context is the one, where the mouse is presented or default when no mouse presention detected. Patch is affecteing only IcedTea-Web custom dialogues.
Diffstat (limited to 'netx/net/sourceforge/jnlp/security/SecurityDialog.java')
-rw-r--r--netx/net/sourceforge/jnlp/security/SecurityDialog.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/netx/net/sourceforge/jnlp/security/SecurityDialog.java b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
index 3c11326..6420c29 100644
--- a/netx/net/sourceforge/jnlp/security/SecurityDialog.java
+++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java
@@ -52,6 +52,7 @@ import java.security.cert.X509Certificate;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.List;
+import net.sourceforge.jnlp.util.ScreenFinder;
/**
* Provides methods for showing security warning dialogs for a wide range of
@@ -312,11 +313,7 @@ public class SecurityDialog extends JDialog {
}
private static void centerDialog(JDialog dialog) {
- Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension dialogSize = dialog.getSize();
-
- dialog.setLocation((screen.width - dialogSize.width) / 2,
- (screen.height - dialogSize.height) / 2);
+ ScreenFinder.centerWindowsToCurrentScreen(dialog);
}
private void selectDefaultButton() {