src/macosx/classes/sun/lwawt/LWComponentPeer.java

Print this page

        

@@ -1197,19 +1197,18 @@
         LWKeyboardFocusManagerPeer.getInstance(getAppContext()).
                 setFocusOwner(e.getID() == FocusEvent.FOCUS_GAINED ? this : null);
     }
 
     /**
-     * Peers with null delegates should clear background before paint.
+     * All peers should clear background before paint.
      *
      * @return false on components that DO NOT require a clearRect() before
      *         painting.
      */
     protected final boolean shouldClearRectBeforePaint() {
-        // By default, just fill the entire bounds with a bg color
         // TODO: sun.awt.noerasebackground
-        return getDelegate() == null;
+        return true;
     }
 
     /**
      * Handler for PAINT and UPDATE PaintEvents.
      */