Uses of Interface
javax.swing.border.Border
Package
Description
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides classes and interface for drawing specialized borders around a Swing
component.
Provides one interface and many abstract classes that Swing uses to provide
its pluggable look-and-feel capabilities.
Provides user interface objects built according to the Basic look and feel.
Provides user interface objects built according to the Java look and feel
(once codenamed Metal), which is the default look and feel.
Provides classes and interfaces for dealing with
javax.swing.JTable
.Provides classes and interfaces for dealing with
javax.swing.JTree
.-
Uses of Border in javax.swing
Modifier and TypeFieldDescriptionprotected static Border
DefaultListCellRenderer.noFocusBorder
No focus borderModifier and TypeMethodDescriptionstatic Border
BorderFactory.createBevelBorder
(int type) Creates a beveled border of the specified type, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createBevelBorder
(int type, Color highlight, Color shadow) Creates a beveled border of the specified type, using the specified highlighting and shadowing.static Border
BorderFactory.createBevelBorder
(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type, using the specified colors for the inner and outer highlight and shadow areas.static Border
BorderFactory.createDashedBorder
(Paint paint) Creates a dashed border of the specifiedpaint
.static Border
BorderFactory.createDashedBorder
(Paint paint, float length, float spacing) Creates a dashed border of the specifiedpaint
, relativelength
, and relativespacing
.static Border
BorderFactory.createDashedBorder
(Paint paint, float thickness, float length, float spacing, boolean rounded) Creates a dashed border of the specifiedpaint
,thickness
, line shape, relativelength
, and relativespacing
.static Border
BorderFactory.createEmptyBorder()
Creates an empty border that takes up no space.static Border
BorderFactory.createEmptyBorder
(int top, int left, int bottom, int right) Creates an empty border that takes up space but which does no drawing, specifying the width of the top, left, bottom, and right sides.static Border
BorderFactory.createEtchedBorder()
Creates a border with an "etched" look using the component's current background color for highlighting and shading.static Border
BorderFactory.createEtchedBorder
(int type) Creates a border with an "etched" look using the component's current background color for highlighting and shading.static Border
BorderFactory.createEtchedBorder
(int type, Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static Border
BorderFactory.createEtchedBorder
(Color highlight, Color shadow) Creates a border with an "etched" look using the specified highlighting and shading colors.static Border
BorderFactory.createLineBorder
(Color color) Creates a line border with the specified color.static Border
BorderFactory.createLineBorder
(Color color, int thickness) Creates a line border with the specified color and width.static Border
BorderFactory.createLineBorder
(Color color, int thickness, boolean rounded) Creates a line border with the specified color, thickness, and corner shape.static Border
BorderFactory.createLoweredBevelBorder()
Creates a border with a lowered beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createLoweredSoftBevelBorder()
Creates a beveled border with a lowered edge and softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createRaisedBevelBorder()
Creates a border with a raised beveled edge, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createRaisedSoftBevelBorder()
Creates a beveled border with a raised edge and softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createSoftBevelBorder
(int type) Creates a beveled border of the specified type with softened corners, using brighter shades of the component's current background color for highlighting, and darker shading for shadows.static Border
BorderFactory.createSoftBevelBorder
(int type, Color highlight, Color shadow) Creates a beveled border of the specified type with softened corners, using the specified highlighting and shadowing.static Border
BorderFactory.createSoftBevelBorder
(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) Creates a beveled border of the specified type with softened corners, using the specified colors for the inner and outer edges of the highlight and the shadow areas.static Border
BorderFactory.createStrokeBorder
(BasicStroke stroke) Creates a border of the specifiedstroke
.static Border
BorderFactory.createStrokeBorder
(BasicStroke stroke, Paint paint) Creates a border of the specifiedstroke
andpaint
.JComponent.getBorder()
Returns the border of this component ornull
if no border is currently set.JLayer.getBorder()
Delegates its functionality to thegetView().getBorder()
method, if the view component is an instance ofjavax.swing.JComponent
, otherwise returnsnull
.If the value ofkey
is aBorder
return it, otherwise returnnull
.If the value ofkey
for the givenLocale
is aBorder
return it, otherwise returnnull
.static Border
Returns a border from the defaults.static Border
Returns a border from the defaults that is appropriate for the given locale.JScrollPane.getViewportBorder()
Returns theBorder
object that surrounds the viewport.Modifier and TypeMethodDescriptionstatic CompoundBorder
BorderFactory.createCompoundBorder
(Border outsideBorder, Border insideBorder) Creates a compound border specifying the border objects to use for the outside and inside edges.static TitledBorder
BorderFactory.createTitledBorder
(Border border) Creates a new titled border with an empty title, the specified border object, the default text position (determined by the current look and feel), the default justification (leading), and the default font and text color (determined by the current look and feel).static TitledBorder
BorderFactory.createTitledBorder
(Border border, String title) Adds a title to an existing border, with default positioning (determined by the current look and feel), default justification (leading) and the default font and text color (determined by the current look and feel).static TitledBorder
BorderFactory.createTitledBorder
(Border border, String title, int titleJustification, int titlePosition) Adds a title to an existing border, with the specified positioning and using the default font and text color (determined by the current look and feel).static TitledBorder
BorderFactory.createTitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Adds a title to an existing border, with the specified positioning and font, and using the default text color (determined by the current look and feel).static TitledBorder
BorderFactory.createTitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Adds a title to an existing border, with the specified positioning, font and color.protected String
JComponent.AccessibleJComponent.getBorderTitle
(Border b) Recursively search through the border hierarchy (if it exists) for a TitledBorder with a non-null title.void
Sets the border of this component.void
Delegates its functionality to thegetView().setBorder(Border)
method, if the view component is an instance ofjavax.swing.JComponent
, otherwise this method is a no-op.final void
The viewport "scrolls" its child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).void
JScrollPane.setViewportBorder
(Border viewportBorder) Adds a border around the viewport. -
Uses of Border in javax.swing.border
Modifier and TypeClassDescriptionclass
A class that implements an empty border with no size.class
A class which implements a simple two-line bevel border.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.class
A class which provides an empty, transparent border which takes up space but does no drawing.class
A class which implements a simple etched border which can either be etched-in or etched-out.class
A class which implements a line border of arbitrary thickness and of a single color.class
A class which provides a matte-like border of either a solid color or a tiled icon.class
A class which implements a raised or lowered bevel with softened corners.class
A class which implements a border of an arbitrary stroke.class
A class which implements an arbitrary border with the addition of a String title in a specified position and justification.Modifier and TypeFieldDescriptionprotected Border
TitledBorder.border
The border.protected Border
CompoundBorder.insideBorder
The inside border.protected Border
CompoundBorder.outsideBorder
The outside border.Modifier and TypeMethodDescriptionstatic Border
LineBorder.createBlackLineBorder()
Convenience method for getting the Color.black LineBorder of thickness 1.static Border
LineBorder.createGrayLineBorder()
Convenience method for getting the Color.gray LineBorder of thickness 1.TitledBorder.getBorder()
Returns the border of the titled border.CompoundBorder.getInsideBorder()
Returns the inside border object.CompoundBorder.getOutsideBorder()
Returns the outside border object.Modifier and TypeMethodDescriptionstatic Rectangle
AbstractBorder.getInteriorRectangle
(Component c, Border b, int x, int y, int width, int height) Returns a rectangle using the arguments minus the insets of the border.void
Sets the border of the titled border.ModifierConstructorDescriptionCompoundBorder
(Border outsideBorder, Border insideBorder) Creates a compound border with the specified outside and inside borders.TitledBorder
(Border border) Creates a TitledBorder instance with the specified border and an empty title.TitledBorder
(Border border, String title) Creates a TitledBorder instance with the specified border and title.TitledBorder
(Border border, String title, int titleJustification, int titlePosition) Creates a TitledBorder instance with the specified border, title, title-justification, and title-position.TitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Creates a TitledBorder instance with the specified border, title, title-justification, title-position, and title-font.TitledBorder
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Creates a TitledBorder instance with the specified border, title, title-justification, title-position, title-font, and title-color. -
Uses of Border in javax.swing.plaf
Modifier and TypeClassDescriptionclass
A Border wrapper class which implements UIResource.static class
A bevel border UI resource.static class
A compound border UI resource.static class
An empty border UI resource.static class
An etched border UI resource.static class
A line border UI resource.static class
A matte border UI resource.static class
A titled border UI resource.Modifier and TypeMethodDescriptionstatic Border
BorderUIResource.getBlackLineBorderUIResource()
Returns a black line border UI resource.static Border
BorderUIResource.getEtchedBorderUIResource()
Returns a etched border UI resource.static Border
BorderUIResource.getLoweredBevelBorderUIResource()
Returns a lowered bevel border UI resource.static Border
BorderUIResource.getRaisedBevelBorderUIResource()
Returns a raised bevel border UI resource.ModifierConstructorDescriptionBorderUIResource
(Border delegate) Creates a UIResource border object which wraps an existing Border instance.CompoundBorderUIResource
(Border outsideBorder, Border insideBorder) Constructs aCompoundBorderUIResource
.TitledBorderUIResource
(Border border) Constructs aTitledBorderUIResource
.TitledBorderUIResource
(Border border, String title) Constructs aTitledBorderUIResource
.TitledBorderUIResource
(Border border, String title, int titleJustification, int titlePosition) Constructs aTitledBorderUIResource
.TitledBorderUIResource
(Border border, String title, int titleJustification, int titlePosition, Font titleFont) Constructs aTitledBorderUIResource
.TitledBorderUIResource
(Border border, String title, int titleJustification, int titlePosition, Font titleFont, Color titleColor) Constructs aTitledBorderUIResource
. -
Uses of Border in javax.swing.plaf.basic
Modifier and TypeClassDescriptionstatic class
Draws a border around a button.static class
Draws the border around a field.static class
Draws the border around components which support margins.static class
Draws the border around a menu bar.static class
Draws the border around a radio button.static class
Special thin border for rollover toolbar buttons.static class
Draws the border around the splitpane.static class
Draws the border around a toggle button.Modifier and TypeFieldDescriptionprotected static Border
BasicComboBoxRenderer.noFocusBorder
An emptyBorder
.Modifier and TypeMethodDescriptionprotected Border
BasicToolBarUI.createNonRolloverBorder()
Creates the non rollover border for toolbar components.protected Border
BasicToolBarUI.createRolloverBorder()
Creates a rollover border for toolbar components.BasicSplitPaneDivider.getBorder()
Returns the border of this component or null if no border is currently set.static Border
BasicBorders.getButtonBorder()
Returns a border instance for aJButton
.static Border
BasicBorders.getInternalFrameBorder()
Returns a border instance for aJInternalFrame
.static Border
BasicBorders.getMenuBarBorder()
Returns a border instance for aJMenuBar
.protected Border
BasicToolBarUI.getNonRolloverBorder
(AbstractButton b) Returns a non-rollover border for the button.static Border
BasicBorders.getProgressBarBorder()
Returns a border instance for aJProgressBar
.static Border
BasicBorders.getRadioButtonBorder()
Returns a border instance for aJRadioButton
.protected Border
BasicToolBarUI.getRolloverBorder
(AbstractButton b) Returns a rollover border for the button.static Border
BasicBorders.getSplitPaneBorder()
Returns a border instance for aJSplitPane
.static Border
BasicBorders.getSplitPaneDividerBorder()
Returns a border instance for aJSplitPane
divider.static Border
BasicBorders.getTextFieldBorder()
Returns a border instance for aJTextField
.static Border
BasicBorders.getToggleButtonBorder()
Returns a border instance for aJToggleButton
. -
Uses of Border in javax.swing.plaf.metal
Modifier and TypeClassDescriptionstatic class
The class represents the border of aJButton
.static class
The class represents the 3D border.static class
The class represents the border of aJInternalFrame
.static class
The class represents the border of aJMenuBar
.static class
The class represents the border of aJMenuItem
.static class
The class represents the border of an option dialog.static class
Border for a Palette.static class
The class represents the border of aJPopupMenu
.static class
The class represents the border of a rolloverButton
.static class
The class represents the border of aJScrollPane
.static class
Border for a Table Headerstatic class
Border for aJTextField
.static class
Border for aJToggleButton
.static class
The class represents the border of aJToolBar
.Modifier and TypeMethodDescriptionstatic Border
MetalBorders.getButtonBorder()
Returns a border instance for aJButton
.static Border
MetalBorders.getDesktopIconBorder()
Returns a border instance for a Desktop Icon.static Border
MetalBorders.getTextBorder()
Returns a border instance for a text component.static Border
MetalBorders.getTextFieldBorder()
Returns a border instance for aJTextField
.static Border
MetalBorders.getToggleButtonBorder()
Returns a border instance for aJToggleButton
. -
Uses of Border in javax.swing.table
Modifier and TypeFieldDescriptionprotected static Border
DefaultTableCellRenderer.noFocusBorder
A border without focus. -
Uses of Border in javax.swing.tree
Modifier and TypeFieldDescriptionprotected Border
DefaultTreeCellEditor.DefaultTextField.border
Border to use.Modifier and TypeMethodDescriptionDefaultTreeCellEditor.DefaultTextField.getBorder()
OverridesJComponent.getBorder
to returns the current border.Modifier and TypeMethodDescriptionvoid
Sets the border of this component.ModifierConstructorDescriptionDefaultTextField
(Border border) Constructs aDefaultTreeCellEditor.DefaultTextField
object.