test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java
changeset 54231 e4813eded7cb
parent 47216 71c04702a3d5
--- a/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java	Wed Feb 27 14:30:08 2019 -0800
+++ b/test/jdk/javax/swing/text/StyledEditorKit/4506788/bug4506788.java	Wed Feb 27 18:46:55 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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,8 +26,7 @@
  * @key headful
  * @bug 4506788 7147408
  * @summary  Tests if cursor gets stuck after insertion a character
- * @author Denis Sharypov
- * @run applet bug4506788.html
+ * @run main bug4506788
  */
 
 import java.awt.*;
@@ -37,12 +36,17 @@
 import javax.swing.event.*;
 import javax.swing.text.*;
 
-public class bug4506788 extends JApplet {
+public class bug4506788 {
 
     private volatile boolean passed = false;
     private JEditorPane jep;
 
-    @Override
+    public static void main(final String[] args) {
+        bug4506788 app = new bug4506788();
+        app.init();
+        app.start();
+    }
+
     public void init() {
         try {
             SwingUtilities.invokeAndWait(new Runnable() {
@@ -57,7 +61,6 @@
         }
     }
 
-    @Override
     public void start() {
         Robot robot;
         try {
@@ -129,6 +132,7 @@
 
         f.getContentPane().add(jep);
         f.setSize(100, 100);
+        f.setLocationRelativeTo(null);
         f.setVisible(true);
     }
 }