void paintComponent(Graphics g){
  RectangularShape rectangle;
  int radius=RapidLookAndFeel.CORNER_DEFAULT_RADIUS;
switch (position) {
case SwingConstants.LEFT:
    rectangle=new RoundRectangle2D.Double(0,0,button.getWidth() + radius,button.getHeight(),radius,radius);
  break;
case SwingConstants.CENTER:
rectangle=new Rectangle2D.Double(0,0,button.getWidth(),button.getHeight());
break;
default :
rectangle=new RoundRectangle2D.Double(-radius,0,button.getWidth() + radius,button.getHeight(),radius,radius);
break;
}
RapidLookTools.drawButton(button,g,rectangle);
}

void paintComponent ( Graphics g ) { RectangularShape rectangle ; int radius = RapidLookAndFeel . CORNER_DEFAULT_RADIUS ; switch ( position ) { case SwingConstants . LEFT : rectangle = new RoundRectangle2D . Double ( 0 , 0 , button . getWidth ( ) + radius , button . getHeight ( ) , radius , radius ) ; break ; case SwingConstants . CENTER : rectangle = new Rectangle2D . Double ( 0 , 0 , button . getWidth ( ) , button . getHeight ( ) ) ; break ; default : rectangle = new RoundRectangle2D . Double ( - radius , 0 , button . getWidth ( ) + radius , button . getHeight ( ) , radius , radius ) ; break ; } RapidLookTools . drawButton ( button , g , rectangle ) ; }
draws the component background .
