UtilGUIpublic class UtilGUI extends Object
Methods Summary |
---|
public static void | center(java.awt.Window w)Center a Window, Frame, JFrame, Dialog, etc.,
but do it the American Spelling Way :-)
UtilGUI.centre(w);
| public static void | centre(java.awt.Window w)Centre a Window, Frame, JFrame, Dialog, etc.
// After packing a Frame or Dialog, centre it on the screen.
Dimension us = w.getSize(),
them = Toolkit.getDefaultToolkit().getScreenSize();
int newX = (them.width - us.width) / 2;
int newY = (them.height- us.height)/ 2;
w.setLocation(newX, newY);
| public static void | maximize(java.awt.Window w)Maximize a window, the hard way.
Dimension us = w.getSize(),
them = Toolkit.getDefaultToolkit().getScreenSize();
w.setBounds(0,0, them.width, them.height);
|
|