Index: /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 5514)
+++ /trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 5515)
@@ -42,4 +42,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.WaySegment;
+import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
 import org.openstreetmap.josm.data.preferences.IntegerProperty;
 import org.openstreetmap.josm.data.projection.Projection;
@@ -48,4 +49,5 @@
 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
 import org.openstreetmap.josm.tools.Predicate;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -111,5 +113,5 @@
     protected EastNorth center = calculateDefaultCenter();
 
-    private static final Object paintRequestLock = new Object();
+    private final Object paintRequestLock = new Object();
     private Rectangle paintRect = null;
     private Polygon paintPoly = null;
@@ -1279,12 +1281,13 @@
             if (paintRect != null) {
                 Graphics g2 = g.create();
-                g2.setColor(Color.BLACK);
-                g2.setXORMode(Color.WHITE);
+                g2.setColor(Utils.complement(PaintColors.getBackgroundColor()));
                 g2.drawRect(paintRect.x, paintRect.y, paintRect.width, paintRect.height);
+                g2.dispose();
             }
             if (paintPoly != null) {
                 Graphics g2 = g.create();
-                g2.setColor(Color.WHITE);
+                g2.setColor(Utils.complement(PaintColors.getBackgroundColor()));
                 g2.drawPolyline(paintPoly.xpoints, paintPoly.ypoints, paintPoly.npoints);
+                g2.dispose();
             }
         }
