--- old/test/jdk/java/awt/Focus/ModalBlockedStealsFocusTest/ModalBlockedStealsFocusTest.java 2018-11-07 13:03:37.000000000 -0800 +++ new/test/jdk/java/awt/Focus/ModalBlockedStealsFocusTest/ModalBlockedStealsFocusTest.java 2018-11-07 13:03:37.000000000 -0800 @@ -22,38 +22,30 @@ */ /* - test - @bug 6426132 - @summary Modal blocked window shouldn't steal focus when shown, or brought to front. - @author anton.tarasov@...: area=awt.focus - @run applet ModalBlockedStealsFocusTest.html + @test + @key headful + @bug 6426132 + @summary Modal blocked window shouldn't steal focus when shown, or brought to front. + @library ../../regtesthelpers + @build Util + @run main ModalBlockedStealsFocusTest */ import java.awt.*; import java.awt.event.*; -import java.applet.Applet; import java.util.concurrent.atomic.AtomicBoolean; -import java.lang.reflect.InvocationTargetException; import test.java.awt.regtesthelpers.Util; -public class ModalBlockedStealsFocusTest extends Applet { +public class ModalBlockedStealsFocusTest { Frame frame = new Frame("Blocked Frame"); Dialog dialog = new Dialog(frame, "Modal Dialog", Dialog.ModalityType.TOOLKIT_MODAL); AtomicBoolean lostFocus = new AtomicBoolean(false); public static void main(String[] args) { ModalBlockedStealsFocusTest app = new ModalBlockedStealsFocusTest(); - app.init(); app.start(); } - public void init() { - // 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() { if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) { System.out.println("The test is not for MToolkit.");