org.xith3d.utility.awt
Class WindowHelper

java.lang.Object
  extended by org.xith3d.utility.awt.WindowHelper

public final class WindowHelper
extends java.lang.Object

This class may help you to adjust your Window (Frame, JFrame, etc.).


Method Summary
static void center(java.awt.Component f)
          Centers the given window on the screen
static void center(java.awt.Frame f, java.awt.GraphicsConfiguration screen)
          Centers the given window on the screen
static java.awt.Point getCenterCoordinates(java.awt.Dimension d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCenterCoordinates

public static java.awt.Point getCenterCoordinates(java.awt.Dimension d)
Returns:
the coordinates for the upper-left corner of you window so that it is centered

center

public static void center(java.awt.Component f)
Centers the given window on the screen

Parameters:
f - the window to be centered

center

public static void center(java.awt.Frame f,
                          java.awt.GraphicsConfiguration screen)
Centers the given window on the screen

Parameters:
f - the window to be centered
screen - the screen to center on