FileDocCategorySizeDatePackage
UtilGUI.javaAPI DocExample911Tue Dec 25 20:04:06 GMT 2001com.darwinsys.util

UtilGUI

public class UtilGUI extends Object
Utilities for GUI work.
version
$Id: UtilGUI.java,v 1.3 2001/12/26 01:04:07 ian Exp $

Fields Summary
Constructors Summary
Methods Summary
public static voidcenter(java.awt.Window w)
Center a Window, Frame, JFrame, Dialog, etc., but do it the American Spelling Way :-)

		UtilGUI.centre(w);
	
public static voidcentre(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 voidmaximize(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);