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

Print this page




  28 import java.awt.Robot;
  29 import java.awt.event.MouseAdapter;
  30 import java.awt.event.MouseEvent;
  31 import javax.swing.JFrame;
  32 import javax.swing.JInternalFrame;
  33 import javax.swing.SwingUtilities;
  34 import test.java.awt.regtesthelpers.Util;
  35 
  36 /**
  37  * AWT/Swing overlapping test with JInternalFrame being put in GlassPane.
  38  * See <a href="https://bugs.openjdk.java.net/browse/JDK-6637655">JDK-6637655</a> and
  39  * <a href="https://bugs.openjdk.java.net/browse/JDK-6985776">JDK-6985776</a>.
  40  * <p>See base class for details.
  41  */
  42 /*
  43  * @test
  44  * @key headful
  45  * @bug 6637655 6985776
  46  * @summary Overlapping test for javax.swing.JScrollPane
  47  * @author sergey.grinev@oracle.com: area=awt.mixing
  48  * @library ../../regtesthelpers
  49  * @modules java.desktop/sun.awt
  50  *          java.desktop/java.awt.peer

  51  * @build Util
  52  * @run main JGlassPaneInternalFrameOverlapping
  53  */
  54 public class JGlassPaneInternalFrameOverlapping extends OverlappingTestBase {
  55 
  56     private boolean lwClicked = true;
  57     private Point lLoc;
  58     private Point lLoc2;
  59     private JInternalFrame internalFrame;
  60 
  61     protected boolean performTest() {
  62         try {
  63             SwingUtilities.invokeAndWait(new Runnable() {
  64                 public void run() {
  65                     lLoc = internalFrame.getContentPane().getLocationOnScreen();
  66                     lLoc2 = lLoc.getLocation();
  67                     lLoc2.translate(0, internalFrame.getContentPane().getHeight() + 10);
  68                 }
  69             });
  70         } catch (Exception e) {




  28 import java.awt.Robot;
  29 import java.awt.event.MouseAdapter;
  30 import java.awt.event.MouseEvent;
  31 import javax.swing.JFrame;
  32 import javax.swing.JInternalFrame;
  33 import javax.swing.SwingUtilities;
  34 import test.java.awt.regtesthelpers.Util;
  35 
  36 /**
  37  * AWT/Swing overlapping test with JInternalFrame being put in GlassPane.
  38  * See <a href="https://bugs.openjdk.java.net/browse/JDK-6637655">JDK-6637655</a> and
  39  * <a href="https://bugs.openjdk.java.net/browse/JDK-6985776">JDK-6985776</a>.
  40  * <p>See base class for details.
  41  */
  42 /*
  43  * @test
  44  * @key headful
  45  * @bug 6637655 6985776
  46  * @summary Overlapping test for javax.swing.JScrollPane
  47  * @author sergey.grinev@oracle.com: area=awt.mixing
  48  * @library /java/awt/patchlib  ../../regtesthelpers
  49  * @modules java.desktop/sun.awt
  50  *          java.desktop/java.awt.peer
  51  * @build java.desktop/java.awt.Helper
  52  * @build Util
  53  * @run main JGlassPaneInternalFrameOverlapping
  54  */
  55 public class JGlassPaneInternalFrameOverlapping extends OverlappingTestBase {
  56 
  57     private boolean lwClicked = true;
  58     private Point lLoc;
  59     private Point lLoc2;
  60     private JInternalFrame internalFrame;
  61 
  62     protected boolean performTest() {
  63         try {
  64             SwingUtilities.invokeAndWait(new Runnable() {
  65                 public void run() {
  66                     lLoc = internalFrame.getContentPane().getLocationOnScreen();
  67                     lLoc2 = lLoc.getLocation();
  68                     lLoc2.translate(0, internalFrame.getContentPane().getHeight() + 10);
  69                 }
  70             });
  71         } catch (Exception e) {