javax.swing.border
public interface Border
To reduce memory consumption, several Components may share a single Border instance. {@link javax.swing.BorderFactory} is a factory class for producing commonly used shared borders.
See Also: BorderFactory EmptyBorder CompoundBorder BevelBorder EtchedBorder LineBorder MatteBorder SoftBevelBorder TitledBorder
Method Summary | |
---|---|
Insets | getBorderInsets(Component c)
Measures the width of this border.
|
boolean | isBorderOpaque()
Determines whether this border fills every pixel in its area
when painting.
|
void | paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border for a given component.
|
Parameters: c the component whose border is to be measured.
Returns: an Insets object whose left
, right
,
top
and bottom
fields indicate the
width of the border at the respective edge.
Returns: true
if the border is fully opaque, or
false
if some pixels of the background
can shine through the border.
Parameters: c the component whose border is to be painted. g the graphics for painting. x the horizontal position for painting the border. y the vertical position for painting the border. width the width of the available area for painting the border. height the height of the available area for painting the border.