In the Swing component set, borders supersede Insets as the mechanism for creating a (decorated or plain) area around the edge of a component.
Usage Notes:
setInsets
).
javax.swing.BorderFactory
, EmptyBorder
, CompoundBorder
Modifier and Type | Method and Description |
---|---|
public Insets | Returns: anInsets object containing the insets from top, left,
bottom and right of this Border the component for which this border insets value applies c)Returns the insets of the border. |
public boolean | |
public void | paintBorder(Component
the component for which this border is being painted c, Graphics the paint graphics g, int the x position of the painted border x, int the y position of the painted border y, int the width of the painted border width, int the height of the painted border height)Paints the border for the specified component with the specified position and size. |
getBorderInsets | back to summary |
---|---|
public Insets getBorderInsets(Component c) Returns the insets of the border. |
isBorderOpaque | back to summary |
---|---|
public boolean isBorderOpaque() Returns whether or not the border is opaque. If the border is opaque, it is responsible for filling in it's own background when painting.
|
paintBorder | back to summary |
---|---|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size. |