< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java

Print this page

        

@@ -629,14 +629,25 @@
     public int getScreenResolution() {
         Win32GraphicsEnvironment ge = (Win32GraphicsEnvironment)
             GraphicsEnvironment.getLocalGraphicsEnvironment();
         return ge.getXResolution();
     }
+
     @Override
-    protected native int getScreenWidth();
+    protected int getScreenWidth() {
+        return GraphicsEnvironment.getLocalGraphicsEnvironment()
+                .getDefaultScreenDevice().getDefaultConfiguration()
+                .getBounds().width;
+    }
+
     @Override
-    protected native int getScreenHeight();
+    protected int getScreenHeight() {
+        return GraphicsEnvironment.getLocalGraphicsEnvironment()
+                .getDefaultScreenDevice().getDefaultConfiguration()
+                .getBounds().height;
+    }
+
     private native Insets getScreenInsets(int screen);
 
 
     @Override
     public FontMetrics getFontMetrics(Font font) {
< prev index next >