public void update(Graphics g,JComponent c){
  if (c.isOpaque()) {
    g.setColor(new ColorUIResource(251,248,241));
    g.fillRect(0,0,c.getWidth(),c.getHeight());
    g.setColor(new ColorUIResource(251,248,241));
    g.fillRect(0,getRoundHeight(),c.getWidth(),c.getHeight() - getRoundHeight());
  }
  paint(g,c);
}

public void update ( Graphics g , JComponent c ) { if ( c . isOpaque ( ) ) { g . setColor ( new ColorUIResource ( 251 , 248 , 241 ) ) ; g . fillRect ( 0 , 0 , c . getWidth ( ) , c . getHeight ( ) ) ; g . setColor ( new ColorUIResource ( 251 , 248 , 241 ) ) ; g . fillRect ( 0 , getRoundHeight ( ) , c . getWidth ( ) , c . getHeight ( ) - getRoundHeight ( ) ) ; } paint ( g , c ) ; }
overriden to paint the background of the component but keeping the rounded corners .
