// The resulting rect is (width+1)x(height+1). Stroke and paint attributes of
// the Graphics2D should be reset to the default values.
// fillRect is used instead of drawLine to bypass stroke
// reset/set and rasterization.
Color color = getColor();
Color colorUp, colorDown;
if (raised) {
colorUp = color.brighter();
colorDown = color.darker();
} else {
colorUp = color.darker();