code: protected void paintBackground (Graphics g)
      {
          // simply fill our background color
          g.setColor(getBackground());
          g.fillRect(0, 0, getWidth(), getHeight());
      }
docs: Paint the background.