< prev index next >

test/jdk/java/awt/event/MouseEvent/RobotLWTest/RobotLWTest.java

Print this page

        

*** 20,61 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 4350402 @summary Tests that mouse behavior on LW component */ - /** - * RobotLWTest.java - * - * summary: - */ - - import java.applet.Applet; import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; ! public class RobotLWTest extends Applet ! { ! //Declare things used in the test, like buttons and labels here ! public void init() ! { ! }//End init() public void start () { Frame frame = new Frame(); MyLWContainer c = new MyLWContainer(); MyLWComponent b = new MyLWComponent(); c.add(b); frame.add(c); frame.setSize(400,400); frame.setVisible(true); try { Robot robot = new Robot(); robot.setAutoWaitForIdle(true); --- 20,57 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 4350402 @summary Tests that mouse behavior on LW component + @compile ../../../regtesthelpers/Util.java + @run main RobotLWTest */ import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; ! public class RobotLWTest { ! public static void main(String[] args) { ! RobotLWTest app = new RobotLWTest(); ! app.start(); ! } public void start () { Frame frame = new Frame(); MyLWContainer c = new MyLWContainer(); MyLWComponent b = new MyLWComponent(); c.add(b); frame.add(c); frame.setSize(400,400); + frame.setLocationRelativeTo(null); frame.setVisible(true); try { Robot robot = new Robot(); robot.setAutoWaitForIdle(true);
< prev index next >