Package com.bc.ceres.swing
Class SwingHelper
- java.lang.Object
-
- com.bc.ceres.swing.SwingHelper
-
public class SwingHelper extends Object
Helper class providing some utilities for Swing programming.
-
-
Constructor Summary
Constructors Constructor Description SwingHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
centerComponent(Component comp, Component alignComp)
Centers the given component over another component.
-
-
-
Method Detail
-
centerComponent
public static void centerComponent(Component comp, Component alignComp)
Centers the given component over another component.The method performs the alignment by setting a newly computed location for the component. It does not alter the component's size.
- Parameters:
comp
- the component whose location is to be alteredalignComp
- the component used for the alignment of the first component, ifnull
the component is ceneterd within the screen area- Throws:
IllegalArgumentException
- if the component isnull
-
-