test/jdk/javax/swing/JPopupMenu/4634626/bug4634626.java
changeset 54231 e4813eded7cb
parent 52739 7199c4da1a6f
--- a/test/jdk/javax/swing/JPopupMenu/4634626/bug4634626.java	Wed Feb 27 14:30:08 2019 -0800
+++ b/test/jdk/javax/swing/JPopupMenu/4634626/bug4634626.java	Wed Feb 27 18:46:55 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,17 +26,16 @@
  * @key headful
  * @bug 4634626
  * @summary Implement context popup menus for components
- * @author Alexander Zuev
  * @library /lib/client
  * @build ExtendedRobot
- * @run applet bug4634626.html
+ * @run main bug4634626
  */
 
 import javax.swing.*;
 import java.awt.event.*;
 import java.awt.*;
 
-public class bug4634626 extends JApplet {
+public class bug4634626 {
 
     public boolean passed = true;
     public boolean done = false;
@@ -84,6 +83,12 @@
 
     public static MouseWatcher mouser = new MouseWatcher();
 
+    public static void main(final String[] args) {
+        bug4634626 app = new bug4634626();
+        app.init();
+        app.destroy();
+    }
+
     public void init() {
 
         try {
@@ -118,6 +123,7 @@
         mainFrame.setLocation(50, 50);
 
         mainFrame.addWindowListener(new TestStateListener());
+        mainFrame.setLocationRelativeTo(null);
         mainFrame.setVisible(true);
 
         while(!done) Thread.yield();