Color colorBg;
Color colorTs;
Color colorBs;
Dimension dim;
super.paint ( graphics );
colorBg = this.getBackground ();
colorTs = colorBg.brighter ();
colorBs = colorBg.darker ();
dim = this.getSize ();
if ( nType == TYPE_ETCHED ) {
graphics.setColor ( colorBs );
graphics.drawRect ( 0, 0, dim.width - 2, dim.height - 2 );
graphics.setColor ( colorTs );
graphics.drawRect ( 1, 1, dim.width - 2, dim.height - 2 );
}
else if ( nType == TYPE_RAISED ) {
graphics.setColor ( colorTs );
graphics.drawLine ( 0, 0, dim.width - 1, 0 );
graphics.drawLine ( 1, 1, dim.width - 2, 1 );
graphics.drawLine ( 0, 0, 0, dim.height - 1 );
graphics.drawLine ( 1, 1, 1, dim.height - 2 );
graphics.setColor ( colorBs );
graphics.drawLine ( 2, dim.height - 2, dim.width - 1, dim.height - 2 );
graphics.drawLine ( 1, dim.height - 1, dim.width - 2, dim.height - 1 );
graphics.drawLine ( dim.width - 2, 2, dim.width - 2, dim.height - 2 );
graphics.drawLine ( dim.width - 1, 1, dim.width - 1, dim.height - 1 );
}
else if ( nType == TYPE_LOWERED ) {
graphics.setColor ( colorBs );
graphics.drawLine ( 0, 0, dim.width - 1, 0 );
graphics.drawLine ( 0, 0, 0, dim.height - 1 );
graphics.setColor ( colorTs );
graphics.drawLine ( 1, dim.height - 1, dim.width - 2, dim.height - 1 );
graphics.drawLine ( dim.width - 1, 1, dim.width - 1, dim.height - 1 );
}