Java Reference
In-Depth Information
public static Border createRaisedBevelBorder()
Border bevelBorder = BorderFactory.createRaisedBevelBorder();
public BevelBorder(int bevelType, Color highlight, Color shadow)
Border bevelBorder = new BevelBorder(BevelBorder.RAISED, Color.PINK, Color.RED);
public static Border createBevelBorder(int bevelType, Color highlight, Color shadow)
Border bevelBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED,
Color.PINK, Color.RED);
public BevelBorder(int bevelType, Color highlightOuter, Color highlightInner,
Color shadowOuter, Color shadowInner)
Border bevelBorder = new BevelBorder(BevelBorder.RAISED, Color.PINK,
Color.PINK.brighter(), Color.RED, Color.RED.darker());
public static Border createBevelBorder(int bevelType, Color highlightOuter,
Color highlightInner, Color shadowOuter, Color shadowInner)
Border bevelBorder = BorderFactory.createBevelBorder(BevelBorder.RAISED,
Color.PINK, Color.PINK.brighter(), Color.RED, Color.RED.darker());
Each allows you to customize both the bevel type and the coloration of the highlighting
and shadowing within the border. The bevel type is specified by one of two values:
BevelBorder.RAISED or BevelBorder.LOWERED . If highlight and shadow colors aren't specified,
the appropriate colors are generated by examining the background of the component for the
border. If you do specify them, remember that the highlight color should be brighter, possibly
done by calling theColor.brighter() . A BevelBorder is opaque, by default.
SoftBevelBorder Class
The soft bevel border is a close cousin of the bevel border. It rounds out the corners so that
their edges aren't as sharp, and it draws only one line, using the appropriate outer color for the
bottom and right sides. As Figure 7-7 shows, the basic appearance of the raised and lowered
SoftBevelBorder is roughly the same as that of the BevelBorder .
Figure 7-7. Raised and lowered SoftBevelBorder sample
 
Search WWH ::




Custom Search