test/java/awt/Mixing/AWT_Mixing/MixingFrameResizing.java

Print this page

        

@@ -27,10 +27,11 @@
 import java.awt.Robot;
 import java.awt.event.InputEvent;
 import javax.swing.JFrame;
 import javax.swing.SpringLayout;
 import javax.swing.SwingUtilities;
+import test.java.awt.regtesthelpers.Util;
 
 /**
  * AWT/Swing overlapping test.
  * <p>This test puts heavyweight component into JFrame and verifies that it's being drawn correctly after resizing the frame.
  * <p>See base class for test info.

@@ -38,10 +39,12 @@
 /*
 @test
 @bug 6777370
 @summary Issues when resizing the JFrame with HW components
 @author sergey.grinev@oracle.com: area=awt.mixing
+@library ../../regtesthelpers
+@build Util
 @run main MixingFrameResizing
  */
 public class MixingFrameResizing extends OverlappingTestBase {
 
     {testEmbeddedFrame = true;}

@@ -75,11 +78,11 @@
                     lLoc2 = frame.getContentPane().getLocationOnScreen();
                 }
             });
         } catch (Exception e) {
             e.printStackTrace();
-            System.exit(1);
+            throw new RuntimeException("Where is frame?");
         }
         Robot robot = Util.createRobot();
         robot.setAutoDelay(ROBOT_DELAY/2);
 
         // resize window