20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 test |
25 @test |
|
26 @key headful |
26 @bug 4350402 |
27 @bug 4350402 |
27 @summary Tests that mouse behavior on LW component |
28 @summary Tests that mouse behavior on LW component |
|
29 @compile ../../../regtesthelpers/Util.java |
|
30 @run main RobotLWTest |
28 */ |
31 */ |
29 |
32 |
30 /** |
|
31 * RobotLWTest.java |
|
32 * |
|
33 * summary: |
|
34 */ |
|
35 |
|
36 import java.applet.Applet; |
|
37 import java.awt.*; |
33 import java.awt.*; |
38 import java.awt.event.*; |
34 import java.awt.event.*; |
39 import test.java.awt.regtesthelpers.Util; |
35 import test.java.awt.regtesthelpers.Util; |
40 |
36 |
41 public class RobotLWTest extends Applet |
37 public class RobotLWTest { |
42 { |
|
43 //Declare things used in the test, like buttons and labels here |
|
44 |
38 |
45 public void init() |
39 public static void main(String[] args) { |
46 { |
40 RobotLWTest app = new RobotLWTest(); |
47 }//End init() |
41 app.start(); |
|
42 } |
48 |
43 |
49 public void start () |
44 public void start () |
50 { |
45 { |
51 Frame frame = new Frame(); |
46 Frame frame = new Frame(); |
52 MyLWContainer c = new MyLWContainer(); |
47 MyLWContainer c = new MyLWContainer(); |
53 MyLWComponent b = new MyLWComponent(); |
48 MyLWComponent b = new MyLWComponent(); |
54 c.add(b); |
49 c.add(b); |
55 frame.add(c); |
50 frame.add(c); |
56 frame.setSize(400,400); |
51 frame.setSize(400,400); |
|
52 frame.setLocationRelativeTo(null); |
57 frame.setVisible(true); |
53 frame.setVisible(true); |
58 |
54 |
59 try { |
55 try { |
60 Robot robot = new Robot(); |
56 Robot robot = new Robot(); |
61 robot.setAutoWaitForIdle(true); |
57 robot.setAutoWaitForIdle(true); |