[izpack-changes] izpack-src/src/lib/com/izforge/izpack/uninstaller UninstallerFrame.java,1.22,1.22.4.1

jponge nobody at sheep.berlios.de
Tue Jan 3 13:49:04 CET 2006


Update of /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/uninstaller
In directory sheep:/tmp/cvs-serv11741/src/lib/com/izforge/izpack/uninstaller

Modified Files:
      Tag: branch-3-8
	UninstallerFrame.java 
Log Message:
Second round of commits toward 3.8.1.

Index: UninstallerFrame.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/uninstaller/UninstallerFrame.java,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -u -d -r1.22 -r1.22.4.1
--- UninstallerFrame.java	6 May 2005 20:09:08 -0000	1.22
+++ UninstallerFrame.java	3 Jan 2006 12:48:31 -0000	1.22.4.1
@@ -22,10 +22,11 @@
 import java.awt.Color;
 import java.awt.Cursor;
 import java.awt.Dimension;
+import java.awt.GraphicsEnvironment;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Insets;
-import java.awt.Toolkit;
+import java.awt.Point;
 import java.awt.Window;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -203,10 +204,10 @@
      */
     private void centerFrame(Window frame)
     {
+        Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
         Dimension frameSize = frame.getSize();
-        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        frame.setLocation((screenSize.width - frameSize.width) / 2,
-                (screenSize.height - frameSize.height) / 2 - 10);
+        frame.setLocation(center.x - frameSize.width / 2,
+                center.y - frameSize.height / 2 - 10);
     }
 
     /**




More information about the izpack-changes mailing list