org.globus.tools.ui.util
Class UITools

java.lang.Object
  extended by org.globus.tools.ui.util.UITools

public abstract class UITools
extends Object

This class provides method to center a Component in a center of a given container

Version:
1.0
Author:
Hung Dinh, David Carew

Constructor Summary
UITools()
           
 
Method Summary
static void center(Container parent, Component comp)
          This method positions a Component in a center of a given Container.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UITools

public UITools()
Method Detail

center

public static void center(Container parent,
                          Component comp)
This method positions a Component in a center of a given Container. If the Container is null or the the Component is larger than the Container, the Component is centered relative to the screen.

Parameters:
parent - The Container relative to which the Component is centered.
comp - The Component to be centered

main

public static void main(String[] args)