Class 1, Part 2
Intro to Java 30-IT-396
Borders
For good GUI design, you often want to make visual groupings of your Swing components. You can do this with Borders.
There are a few different types of borders you can use out of the box, including:
Lowered Bevel
Raised Bevel
Etched
Line
Matte
Blank
To create a border, use a factory method of the
BorderFactory
class.
For example, to create an etched border,
Border etchedBorder = BorderFactory.createEtchedBorder();
You can also specify widths and colors.
Comprehensive Swing Example
Created by:
Brandan Jones
January 4, 2002