Java Reference
In-Depth Information
LISTING 7.24
continued
DISPLAY
desired, including the outer highlight, inner highlight, outer shadow, and inner
shadow. Each of these aspects could be a different color if desired.
A
titled border
places a title on or around the border. The default position for
the title is on the border at the top-left edge. Using the
setTitleJustification
method of the
TitledBorder
class, this position can be set to many other places
above, below, on, or to the left, right, or center of the border.
A
compound border
is a combination of two or more borders. The example
in this program creates a compound border using a line border and an etched
border. The
createCompoundBorder
method accepts two borders as parameters
and makes the first parameter the outer border and the second parameter the
inner border. Combinations of three or more borders are created by first creating
a compound border using two borders, then making another compound border
using it and yet another one.
Search WWH ::
Custom Search