Class GridBagPanel
Class GridBagPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----GridBagPanel
- class GridBagPanel
- extends Panel
This class is simply a Panel that is managed
by the GridBagLayout manager.
-
GridBagPanel()
- Instantiate a new Panel and set its layout
manager to be GridBagLayout.
-
addComponent(Component, int, int, int, int, int, int, int, int)
- A generic method that allows you to add a Component to the
GridBagPanel and specify all of the GridBagConstraints
at the same time.
GridBagPanel
public GridBagPanel()
- Instantiate a new Panel and set its layout
manager to be GridBagLayout.
addComponent
public void addComponent(Component component,
int gx,
int gy,
int gw,
int gh,
int wx,
int wy,
int fill,
int anchor)
- A generic method that allows you to add a Component to the
GridBagPanel and specify all of the GridBagConstraints
at the same time. Each component has a default Inset setting
of (3, 1, 3, 1).
- Parameters:
- component - the component being added to the Panel
- gx - the gridx constraint
- gy - the gridy constraint
- gw - the grid width constraint
- gh - the grid height constraint
- wx - the weightx constraint
- wy - the weighty constraint
- fill - the fill constraint
- anchor - the anchor constraint