test/java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java

Print this page

        

@@ -29,10 +29,11 @@
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import javax.swing.JFrame;
 import javax.swing.JInternalFrame;
 import javax.swing.SwingUtilities;
+import test.java.awt.regtesthelpers.Util;
 
 /**
  * AWT/Swing overlapping test with JInternalFrame being put in GlassPane.
  * See <a href="https://bugs.openjdk.java.net/browse/JDK-6637655">JDK-6637655</a> and
  * <a href="https://bugs.openjdk.java.net/browse/JDK-6985776">JDK-6985776</a>.

@@ -41,10 +42,12 @@
 /*
 @test
 @bug 6637655 6985776
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
+@library ../../regtesthelpers
+@build Util
 @run main JGlassPaneInternalFrameOverlapping
  */
 public class JGlassPaneInternalFrameOverlapping extends OverlappingTestBase {
 
     private boolean lwClicked = true;

@@ -61,11 +64,11 @@
                     lLoc2.translate(0, internalFrame.getContentPane().getHeight() + 10);
                 }
             });
         } catch (Exception e) {
             e.printStackTrace();
-            System.exit(1);
+            throw new RuntimeException("Where is internal frame?");
         }
         // run robot
         Robot robot = Util.createRobot();
         robot.setAutoDelay(ROBOT_DELAY);