jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java
equal
deleted
inserted
replaced
29 import javax.swing.border.EmptyBorder; |
29 import javax.swing.border.EmptyBorder; |
30 import javax.swing.border.LineBorder; |
30 import javax.swing.border.LineBorder; |
31 |
31 |
32 import com.sun.swingset3.DemoProperties; |
32 import com.sun.swingset3.DemoProperties; |
33 import com.sun.swingset3.demos.DemoUtilities; |
33 import com.sun.swingset3.demos.DemoUtilities; |
|
34 import java.lang.reflect.InvocationTargetException; |
34 |
35 |
35 /** |
36 /** |
36 * @author aim |
37 * @author aim |
37 */ |
38 */ |
38 @DemoProperties( |
39 @DemoProperties( |
143 public void actionPerformed(ActionEvent actionEvent) { |
144 public void actionPerformed(ActionEvent actionEvent) { |
144 showWindow(); |
145 showWindow(); |
145 } |
146 } |
146 } |
147 } |
147 |
148 |
148 public static void main(String args[]) { |
149 public static void main(String args[]) throws InterruptedException, InvocationTargetException { |
149 EventQueue.invokeLater(() -> { |
150 EventQueue.invokeAndWait(() -> { |
150 JFrame frame = new JFrame(); |
151 JFrame frame = new JFrame(); |
151 WindowDemo demo = new WindowDemo(); |
152 WindowDemo demo = new WindowDemo(); |
152 frame.add(demo); |
153 frame.add(demo); |
153 frame.pack(); |
154 frame.pack(); |
154 frame.setVisible(true); |
155 frame.setVisible(true); |