public class GUIUtil
extends java.lang.Object
Constructor and Description |
---|
GUIUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addComponent(java.awt.Container container,
java.awt.Component c,
java.awt.GridBagConstraints gbc) |
static void |
addComponent(java.awt.Container container,
java.awt.Component c,
int x,
int y,
int w,
int h) |
static void |
addComponent(java.awt.Container container,
java.awt.Component c,
int x,
int y,
int w,
int h,
int fill,
int anchor,
int wx,
int wy)
Adds a component into a container component of
GridBagLayout. |
static void |
addInput2Pane(java.lang.String label,
java.awt.Component c,
javax.swing.JPanel p,
int row)
add the component with the label at left to the JPanel at row
|
static java.awt.Frame |
getTopestParent(java.awt.Component component)
Gets the toppest parent of a component.
|
public static void addComponent(java.awt.Container container, java.awt.Component c, int x, int y, int w, int h, int fill, int anchor, int wx, int wy) throws java.awt.AWTException
GridBagLayout.
container
- a Container
where a component will be addedc
- a Component
to be added into a containerx
- an interger specifying the x coordiante of the added componenty
- an integer specifying the y coordinate of the added componentw
- an integer specifying the width of the added componenth
- an integer specifying the height of the added componentanchor
- an interger specifying the anchor point of the added componentwx
- an double specifying the extra horizontal space distributionwy
- an double specifying the extra vertical space distributionjava.awt.AWTException
- Abstract Window Toolkit exceptionpublic static void addComponent(java.awt.Container container, java.awt.Component c, int x, int y, int w, int h) throws java.awt.AWTException
java.awt.AWTException
public static void addInput2Pane(java.lang.String label, java.awt.Component c, javax.swing.JPanel p, int row) throws java.awt.AWTException
java.awt.AWTException
public static void addComponent(java.awt.Container container, java.awt.Component c, java.awt.GridBagConstraints gbc) throws java.awt.AWTException
java.awt.AWTException
public static java.awt.Frame getTopestParent(java.awt.Component component)
a
- Component