Package com.bc.ceres.swing
Class SwingHelper
java.lang.Object
com.bc.ceres.swing.SwingHelper
Helper class providing some utilities for Swing programming.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
centerComponent
(Component comp, Component alignComp) Centers the given component over another component.
-
Constructor Details
-
SwingHelper
public SwingHelper()
-
-
Method Details
-
centerComponent
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
-