javax.swing.border
Interface Border

All Known Implementing Classes:
AbstractBorder sample code for javax.swing.border.AbstractBorder definition code for javax.swing.border.AbstractBorder , BasicBorders.ButtonBorder sample code for javax.swing.plaf.basic.BasicBorders.ButtonBorder definition code for javax.swing.plaf.basic.BasicBorders.ButtonBorder , BasicBorders.FieldBorder sample code for javax.swing.plaf.basic.BasicBorders.FieldBorder definition code for javax.swing.plaf.basic.BasicBorders.FieldBorder , BasicBorders.MarginBorder sample code for javax.swing.plaf.basic.BasicBorders.MarginBorder definition code for javax.swing.plaf.basic.BasicBorders.MarginBorder , BasicBorders.MenuBarBorder sample code for javax.swing.plaf.basic.BasicBorders.MenuBarBorder definition code for javax.swing.plaf.basic.BasicBorders.MenuBarBorder , BasicBorders.RadioButtonBorder sample code for javax.swing.plaf.basic.BasicBorders.RadioButtonBorder definition code for javax.swing.plaf.basic.BasicBorders.RadioButtonBorder , BasicBorders.RolloverButtonBorder sample code for javax.swing.plaf.basic.BasicBorders.RolloverButtonBorder definition code for javax.swing.plaf.basic.BasicBorders.RolloverButtonBorder , BasicBorders.SplitPaneBorder sample code for javax.swing.plaf.basic.BasicBorders.SplitPaneBorder definition code for javax.swing.plaf.basic.BasicBorders.SplitPaneBorder , BasicBorders.ToggleButtonBorder sample code for javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder definition code for javax.swing.plaf.basic.BasicBorders.ToggleButtonBorder , BevelBorder sample code for javax.swing.border.BevelBorder definition code for javax.swing.border.BevelBorder , BorderUIResource sample code for javax.swing.plaf.BorderUIResource definition code for javax.swing.plaf.BorderUIResource , BorderUIResource.BevelBorderUIResource sample code for javax.swing.plaf.BorderUIResource.BevelBorderUIResource definition code for javax.swing.plaf.BorderUIResource.BevelBorderUIResource , BorderUIResource.CompoundBorderUIResource sample code for javax.swing.plaf.BorderUIResource.CompoundBorderUIResource definition code for javax.swing.plaf.BorderUIResource.CompoundBorderUIResource , BorderUIResource.EmptyBorderUIResource sample code for javax.swing.plaf.BorderUIResource.EmptyBorderUIResource definition code for javax.swing.plaf.BorderUIResource.EmptyBorderUIResource , BorderUIResource.EtchedBorderUIResource sample code for javax.swing.plaf.BorderUIResource.EtchedBorderUIResource definition code for javax.swing.plaf.BorderUIResource.EtchedBorderUIResource , BorderUIResource.LineBorderUIResource sample code for javax.swing.plaf.BorderUIResource.LineBorderUIResource definition code for javax.swing.plaf.BorderUIResource.LineBorderUIResource , BorderUIResource.MatteBorderUIResource sample code for javax.swing.plaf.BorderUIResource.MatteBorderUIResource definition code for javax.swing.plaf.BorderUIResource.MatteBorderUIResource , BorderUIResource.TitledBorderUIResource sample code for javax.swing.plaf.BorderUIResource.TitledBorderUIResource definition code for javax.swing.plaf.BorderUIResource.TitledBorderUIResource , CompoundBorder sample code for javax.swing.border.CompoundBorder definition code for javax.swing.border.CompoundBorder , EmptyBorder sample code for javax.swing.border.EmptyBorder definition code for javax.swing.border.EmptyBorder , EtchedBorder sample code for javax.swing.border.EtchedBorder definition code for javax.swing.border.EtchedBorder , LineBorder sample code for javax.swing.border.LineBorder definition code for javax.swing.border.LineBorder , MatteBorder sample code for javax.swing.border.MatteBorder definition code for javax.swing.border.MatteBorder , MetalBorders.ButtonBorder sample code for javax.swing.plaf.metal.MetalBorders.ButtonBorder definition code for javax.swing.plaf.metal.MetalBorders.ButtonBorder , MetalBorders.Flush3DBorder sample code for javax.swing.plaf.metal.MetalBorders.Flush3DBorder definition code for javax.swing.plaf.metal.MetalBorders.Flush3DBorder , MetalBorders.InternalFrameBorder sample code for javax.swing.plaf.metal.MetalBorders.InternalFrameBorder definition code for javax.swing.plaf.metal.MetalBorders.InternalFrameBorder , MetalBorders.MenuBarBorder sample code for javax.swing.plaf.metal.MetalBorders.MenuBarBorder definition code for javax.swing.plaf.metal.MetalBorders.MenuBarBorder , MetalBorders.MenuItemBorder sample code for javax.swing.plaf.metal.MetalBorders.MenuItemBorder definition code for javax.swing.plaf.metal.MetalBorders.MenuItemBorder , MetalBorders.OptionDialogBorder sample code for javax.swing.plaf.metal.MetalBorders.OptionDialogBorder definition code for javax.swing.plaf.metal.MetalBorders.OptionDialogBorder , MetalBorders.PaletteBorder sample code for javax.swing.plaf.metal.MetalBorders.PaletteBorder definition code for javax.swing.plaf.metal.MetalBorders.PaletteBorder , MetalBorders.PopupMenuBorder sample code for javax.swing.plaf.metal.MetalBorders.PopupMenuBorder definition code for javax.swing.plaf.metal.MetalBorders.PopupMenuBorder , MetalBorders.RolloverButtonBorder sample code for javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder definition code for javax.swing.plaf.metal.MetalBorders.RolloverButtonBorder , MetalBorders.ScrollPaneBorder sample code for javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder definition code for javax.swing.plaf.metal.MetalBorders.ScrollPaneBorder , MetalBorders.TableHeaderBorder sample code for javax.swing.plaf.metal.MetalBorders.TableHeaderBorder definition code for javax.swing.plaf.metal.MetalBorders.TableHeaderBorder , MetalBorders.TextFieldBorder sample code for javax.swing.plaf.metal.MetalBorders.TextFieldBorder definition code for javax.swing.plaf.metal.MetalBorders.TextFieldBorder , MetalBorders.ToggleButtonBorder sample code for javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder definition code for javax.swing.plaf.metal.MetalBorders.ToggleButtonBorder , MetalBorders.ToolBarBorder sample code for javax.swing.plaf.metal.MetalBorders.ToolBarBorder definition code for javax.swing.plaf.metal.MetalBorders.ToolBarBorder , SoftBevelBorder sample code for javax.swing.border.SoftBevelBorder definition code for javax.swing.border.SoftBevelBorder , TitledBorder sample code for javax.swing.border.TitledBorder definition code for javax.swing.border.TitledBorder

public interface Border

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:

See Also:
BorderFactory sample code for javax.swing.BorderFactory definition code for javax.swing.BorderFactory , EmptyBorder sample code for javax.swing.border.EmptyBorder definition code for javax.swing.border.EmptyBorder , CompoundBorder sample code for javax.swing.border.CompoundBorder definition code for javax.swing.border.CompoundBorder

Method Summary
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getBorderInsets sample code for javax.swing.border.Border.getBorderInsets(java.awt.Component) definition code for javax.swing.border.Border.getBorderInsets(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Returns the insets of the border.
 boolean isBorderOpaque sample code for javax.swing.border.Border.isBorderOpaque() definition code for javax.swing.border.Border.isBorderOpaque() ()
          Returns whether or not the border is opaque.
 void paintBorder sample code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  c, Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int x, int y, int width, int height)
          Paints the border for the specified component with the specified position and size.
 

Method Detail

paintBorder sample code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int) definition code for javax.swing.border.Border.paintBorder(java.awt.Component, java.awt.Graphics, int, int, int, int)

void paintBorder(Component sample code for java.awt.Component definition code for java.awt.Component  c,
                 Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                 int x,
                 int y,
                 int width,
                 int height)
Paints the border for the specified component with the specified position and size.

Parameters:
c - the component for which this border is being painted
g - the paint graphics
x - the x position of the painted border
y - the y position of the painted border
width - the width of the painted border
height - the height of the painted border

getBorderInsets sample code for javax.swing.border.Border.getBorderInsets(java.awt.Component) definition code for javax.swing.border.Border.getBorderInsets(java.awt.Component)

Insets sample code for java.awt.Insets definition code for java.awt.Insets  getBorderInsets(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Returns the insets of the border.

Parameters:
c - the component for which this border insets value applies

isBorderOpaque sample code for javax.swing.border.Border.isBorderOpaque() definition code for javax.swing.border.Border.isBorderOpaque()

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.