< prev index next >

test/jdk/java/awt/Focus/ClearLwQueueBreakTest/ClearLwQueueBreakTest.java

Print this page

        

*** 24,47 **** /* @test @key headful @bug 6496958 @summary Tests that breaking the proccess of clearing LW requests doesn't break focus. - @author anton.tarasov@...: area=awt-focus @library ../../regtesthelpers @build Util @run main ClearLwQueueBreakTest */ import java.awt.*; import javax.swing.*; import java.awt.event.*; - import java.applet.Applet; import test.java.awt.regtesthelpers.Util; import java.util.concurrent.atomic.AtomicBoolean; ! public class ClearLwQueueBreakTest extends Applet { JFrame f1 = new JFrame("frame"); JFrame f2 = new JFrame("frame"); JButton b = new JButton("button"); JTextField tf1 = new JTextField(" "); JTextField tf2 = new JTextField(" "); --- 24,45 ---- /* @test @key headful @bug 6496958 @summary Tests that breaking the proccess of clearing LW requests doesn't break focus. @library ../../regtesthelpers @build Util @run main ClearLwQueueBreakTest */ import java.awt.*; import javax.swing.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; import java.util.concurrent.atomic.AtomicBoolean; ! public class ClearLwQueueBreakTest { JFrame f1 = new JFrame("frame"); JFrame f2 = new JFrame("frame"); JButton b = new JButton("button"); JTextField tf1 = new JTextField(" "); JTextField tf2 = new JTextField(" ");
*** 58,72 **** app.start(); } public void init() { robot = Util.createRobot(); - - // Create instructions for the user here, as well as set up - // the environment -- set the layout manager, add buttons, - // etc. - this.setLayout (new BorderLayout ()); } public void start() { b.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { --- 56,65 ----
*** 116,125 **** --- 109,119 ---- f1.add(tf1); f1.add(tf2); f1.add(tf3); f1.setLayout(new FlowLayout()); f1.pack(); + f1.setLocationRelativeTo(null); f1.setVisible(true); Util.waitForIdle(robot); /* * Break the sequence of LW requests in the middle.
< prev index next >