javax.swing.border |
Provides classes and interface for drawing
specialized borders around a Swing component.
You can subclass these classes to create customized borders
for your components instead of using the default borders
provided by the look-and-feel being used.
Note:
Most of the Swing API is not thread safe.
For details, see
Threads and Swing,
a section in
The Java Tutorial.
Related Documentation
For overviews, tutorials, examples, guides, and tool documentation, please see:
@since 1.2
@serial exclude
|
Java Source File Name | Type | Comment |
AbstractBorder.java | Class | A class that implements an empty border with no size. |
BevelBorder.java | Class | A class which implements a simple two-line bevel border.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
Border.java | Interface | Interface describing an object capable of rendering a border
around the edges of a swing component.
For examples of using borders see
How to Use Borders,
a section in The Java Tutorial.
In the Swing component set, borders supercede Insets as the
mechanism for creating a (decorated or plain) area around the
edge of a component.
Usage Notes:
- Use EmptyBorder to create a plain border (this mechanism
replaces its predecessor,
setInsets ).
- Use CompoundBorder to nest multiple border objects, creating
a single, combined border.
- Border instances are designed to be shared.
|
CompoundBorder.java | Class | A composite Border class used to compose two Border objects
into a single border by nesting an inside Border object within
the insets of an outside Border object.
For example, this class may be used to add blank margin space
to a component with an existing decorative border:
Border border = comp.getBorder();
Border margin = new EmptyBorder(10,10,10,10);
comp.setBorder(new CompoundBorder(border, margin));
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
EmptyBorder.java | Class | A class which provides an empty, transparent border which
takes up space but does no drawing.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
EtchedBorder.java | Class | A class which implements a simple etched border which can
either be etched-in or etched-out. |
LineBorder.java | Class | A class which implements a line border of arbitrary thickness
and of a single color.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
MatteBorder.java | Class | A class which provides a matte-like border of either a solid color
or a tiled icon.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
SoftBevelBorder.java | Class | A class which implements a raised or lowered bevel with
softened corners.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |
TitledBorder.java | Class | A class which implements an arbitrary border
with the addition of a String title in a
specified position and justification.
If the border, font, or color property values are not
specified in the constuctor or by invoking the appropriate
set methods, the property values will be defined by the current
look and feel, using the following property names in the
Defaults Table:
- "TitledBorder.border"
- "TitledBorder.font"
- "TitledBorder.titleColor"
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. |