Module java.desktop

Class TitledBorder

java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.TitledBorder
All Implemented Interfaces:
Serializable, Border
Direct Known Subclasses:
BorderUIResource.TitledBorderUIResource

public class TitledBorder extends AbstractBorder
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 constructor 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. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see XMLEncoder.