test/java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java

Print this page

        

@@ -35,10 +35,11 @@
 import javax.swing.JComponent;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.SwingUtilities;
+import test.java.awt.regtesthelpers.Util;
 
 /**
  * AWT/Swing overlapping test for viewport
  * <p>This test verify if AWT components are drawn correctly being partially shown through viewport
  * <p>See <a href="http://monaco.sfbay.sun.com/detail.jsf?cr=6778882">CR6778882</a> for details

@@ -47,10 +48,12 @@
 /*
 @test
 @bug 6778882
 @summary Viewport overlapping test for each AWT component
 @author sergey.grinev@oracle.com: area=awt.mixing
+@library ../../regtesthelpers
+@build Util
 @run main ViewportOverlapping
  */
 public class ViewportOverlapping extends OverlappingTestBase {
 
     private volatile int frameClicked;

@@ -114,11 +117,11 @@
                     resizeLoc.translate(f.getWidth() - 1, f.getHeight() - 1);
                 }
             });
         } catch (Exception e) {
             e.printStackTrace();
-            System.exit(1);
+            throw new RuntimeException("Problem preparing test GUI.");
         }
         // run robot
         Robot robot = Util.createRobot();
         robot.setAutoDelay(ROBOT_DELAY);