Esempio n. 1
0
 /** Regular paint method from <code>Component</code> class. */
 public void paint(Graphics g) {
   if (getTabCount() == 0) {
     // if there are no tabs in tabbed pane, draw a fillRect for
     // entire area of tabbed pane so as to reflect the background
     // that of the desktop pane which is used along with this tabbed
     // pane in MDIFrame class.
     g.setColor(parentFrame.getDektopPane().getBackground());
     g.fillRect(0, 0, getWidth(), getHeight());
   } else {
     super.paint(g);
   }
 }