< prev index next >

src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java

Print this page

        

@@ -106,11 +106,13 @@
                 // If the bootstrap class loader fails, we try again with the
                 // application class loader.
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
                 geCls = Class.forName(nm, true, cl);
             }
-            ge = (GraphicsEnvironment)geCls.newInstance();
+            @SuppressWarnings("deprecation")
+            Object tmp = geCls.newInstance();
+            ge = (GraphicsEnvironment)tmp;
 //          long t1 = System.currentTimeMillis();
 //          System.out.println("GE creation took " + (t1-t0)+ "ms.");
             if (isHeadless()) {
                 ge = new HeadlessGraphicsEnvironment(ge);
             }
< prev index next >