6470361: Swing's Threading Policy example does not compile
authorserb
Tue, 16 Dec 2014 19:26:06 +0300
changeset 28232 c3204411e7a5
parent 28231 b608ffcaed74
child 28233 9dc3764ed475
6470361: Swing's Threading Policy example does not compile Reviewed-by: azvegint, alexsch
jdk/src/java.desktop/share/classes/javax/swing/package.html
--- a/jdk/src/java.desktop/share/classes/javax/swing/package.html	Mon Dec 15 17:20:17 2014 -0800
+++ b/jdk/src/java.desktop/share/classes/javax/swing/package.html	Tue Dec 16 19:26:06 2014 +0300
@@ -3,7 +3,7 @@
 
 <HEAD>
 <!--
-Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -68,6 +68,8 @@
 the event dispatching thread. The following two examples work equally
 well for transferring control and starting up a Swing application:
 <pre>
+import javax.swing.SwingUtilities;
+
 public class MyApp implements Runnable {
     public void run() {
         // Invoked on the event dispatching thread.
@@ -75,16 +77,18 @@
     }
 
     public static void main(String[] args) {
-        SwingUtilities.invokeLater(new MyApp(args));
+        SwingUtilities.invokeLater(new MyApp());
     }
 }
 </pre>
 Or:
 <pre>
+import javax.swing.SwingUtilities;
+
 public class MyApp {
     MyApp(String[] args) {
-        // Invoked on the event dispatching thread. Do any initialization
-        // here.
+        // Invoked on the event dispatching thread.
+        // Do any initialization here.
     }
 
     public void show() {