Changeset 15615

Show
Ignore:
Timestamp:
21.05.2008 15:17:29 (11 years ago)
Author:
oranfry
Message:

centered the swing window on startup

Location:
release-kits/shared/ant-installer
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • release-kits/shared/ant-installer/src/org/tp23/antinstaller/runtime/SwingRunner.java

    r15210 r15615  
    1717 
    1818import java.awt.GraphicsConfiguration; 
     19import java.awt.Toolkit; 
     20import java.awt.Dimension; 
    1921import java.io.ByteArrayOutputStream; 
    2022import java.io.InputStream; 
     
    98100            frame.getRootPane().setDoubleBuffered(true); 
    99101            frame.setResizable( true ); 
     102 
     103            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); 
     104            frame.setLocation(screenSize.width/2 - frame.getWidth()/2, screenSize.height/2 - frame.getHeight()/2); 
     105 
    100106            //setLocation(frame); 
    101107            setIcon(frame, installer);