src/macosx/classes/com/apple/laf/AquaToolBarUI.java

Print this page

        

@@ -71,13 +71,11 @@
 
         public void paintBorder(final java.awt.Component c, final Graphics g, int x, int y, final int w, final int h) {
             g.translate(x, y);
 
             if (c.isOpaque()) {
-                final Color background = c.getBackground();
-                g.setColor(background);
-                g.fillRect(0, 0, w - 1, h - 1);
+                AquaUtils.fillRect(g, c, c.getBackground(), 0, 0, w - 1, h - 1);
             }
 
             final Color oldColor = g.getColor();
 
             final JToolBar jtb = (JToolBar)c;

@@ -135,6 +133,14 @@
 
         public boolean isBorderOpaque() {
             return true;
         }
     }
+
+    @Override
+    public final void update(final Graphics g, final JComponent c) {
+        if (c.isOpaque()) {
+            AquaUtils.fillRect(g, c);
+        }
+        paint(g, c);
+    }
 }