| Site Map | WizTools.org | jCraze Blog |
![]() |
Centered JFrameThis example displays the JFrame in the center of the screen, irrespective of the screen resolution. The variable jf is the JFrame variable. This example can be applied to other Dialog/Window objects such as JDialog, JWindow, etc. import java.awt.*; import javax.swing.*; ==================== Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); jf.setLocation((d.width-jf.getWidth())/2, (d.height-jf.getHeight())/2); jf.setVisible(true); |
[Quick Stats: Number of main threads: 1, Number of sub-threads: 0]
Sign Guestbook
|
Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.