Ejemplo n.º 1
0
 public void paintBackground(Graphics g, JComponent c) {
   if (c.isOpaque()) {
     if ((c.getBackground().equals(AbstractLookAndFeel.getBackgroundColor()))
         && (c.getBackground() instanceof ColorUIResource)) {
       HiFiUtils.fillComponent(g, c);
     } else {
       g.setColor(c.getBackground());
       g.fillRect(0, 0, c.getWidth(), c.getHeight());
     }
   }
 }
Ejemplo n.º 2
0
 public void paintBackground(Graphics g, JComponent c) {
   if (c.isOpaque()) {
     Component parent = c.getParent();
     if ((parent != null) && (parent.getBackground() instanceof ColorUIResource)) {
       HiFiUtils.fillComponent(g, c);
     } else {
       if (parent != null) {
         g.setColor(parent.getBackground());
       } else {
         g.setColor(c.getBackground());
       }
       g.fillRect(0, 0, c.getWidth(), c.getHeight());
     }
   }
 }