equal
deleted
inserted
replaced
36 */ |
36 */ |
37 |
37 |
38 import java.awt.*; |
38 import java.awt.*; |
39 import java.awt.event.*; |
39 import java.awt.event.*; |
40 |
40 |
41 import sun.awt.SunToolkit; |
|
42 |
|
43 public class CtorTest |
41 public class CtorTest |
44 { |
42 { |
45 public static void main(String []s) throws Exception |
43 public static void main(String []s) throws Exception |
46 { |
44 { |
47 // one parameter constructor |
45 // one parameter constructor |
55 private static void clickOnFrame(Robot robot) { |
53 private static void clickOnFrame(Robot robot) { |
56 Frame frame = new Frame(); |
54 Frame frame = new Frame(); |
57 frame.setBounds(100, 100, 100, 100); |
55 frame.setBounds(100, 100, 100, 100); |
58 frame.setVisible(true); |
56 frame.setVisible(true); |
59 |
57 |
60 ((SunToolkit)Toolkit.getDefaultToolkit()).realSync(); |
58 robot.waitForIdle(); |
61 |
59 |
62 // click in the middle of the frame |
60 // click in the middle of the frame |
63 robot.mouseMove(150, 150); |
61 robot.mouseMove(150, 150); |
64 robot.delay(50); |
62 robot.delay(50); |
65 robot.mousePress(InputEvent.BUTTON1_MASK); |
63 robot.mousePress(InputEvent.BUTTON1_MASK); |
66 robot.delay(50); |
64 robot.delay(50); |
67 robot.mouseRelease(InputEvent.BUTTON1_MASK); |
65 robot.mouseRelease(InputEvent.BUTTON1_MASK); |
68 |
66 |
69 ((SunToolkit)Toolkit.getDefaultToolkit()).realSync(); |
67 robot.waitForIdle(); |
70 } |
68 } |
71 } |
69 } |