Index: /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 5503)
+++ /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 5504)
@@ -277,7 +277,6 @@
         for (int j = 0; j < gs.length; j++) {
             GraphicsDevice gd = gs[j];
-            GraphicsConfiguration[] gc = gd.getConfigurations();
-            for (int i = 0; i < gc.length; i++) {
-                virtualBounds = virtualBounds.union(gc[i].getBounds());
+            if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) {
+            	virtualBounds = virtualBounds.union(gd.getDefaultConfiguration().getBounds());
             }
         }
@@ -316,8 +315,7 @@
         for (int j = 0; j < gs.length; j++) {
             GraphicsDevice gd = gs[j];
-            GraphicsConfiguration[] gc = gd.getConfigurations();
-            for (int i = 0; i < gc.length; i++) {
-                Rectangle b = gc[i].getBounds();
-                if(b.width/b.height >= 3) /* multiscreen with wrong definition */
+            if (gd.getType() == GraphicsDevice.TYPE_RASTER_SCREEN) {
+                Rectangle b = gd.getDefaultConfiguration().getBounds();
+                if (b.height > 0 && b.width/b.height >= 3) /* multiscreen with wrong definition */
                 {
                     b.width /= 2;
