test/java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java

Print this page




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 import java.awt.Dimension;
  26 import javax.swing.*;
  27 
  28 /**
  29  * AWT/Swing overlapping test for {@link javax.swing.JTextField } component in GlassPane.
  30  * <p>See base class for details.
  31  */
  32 /*
  33 @test
  34 @summary Simple Overlapping test for javax.swing.JLabel
  35 @author sergey.grinev@oracle.com: area=awt.mixing
  36 @library ../../regtesthelpers
  37 @modules java.desktop/sun.awt

  38 @build Util
  39 @run main JTextFieldInGlassPaneOverlapping
  40  */
  41 public class JTextFieldInGlassPaneOverlapping extends GlassPaneOverlappingTestBase {
  42 
  43     @Override
  44     protected JComponent getSwingComponent() {
  45         JTextField ch = new JTextField();
  46         ch.setPreferredSize(new Dimension(50, 50));
  47         ch.setText("Swing component");
  48         return ch;
  49     }
  50 
  51     // this strange plumbing stuff is required due to "Standard Test Machinery" in base class
  52     public static void main(String args[]) throws InterruptedException {
  53         instance = new JTextFieldInGlassPaneOverlapping();
  54         OverlappingTestBase.doMain(args);
  55     }
  56 }


  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 import java.awt.Dimension;
  26 import javax.swing.*;
  27 
  28 /**
  29  * AWT/Swing overlapping test for {@link javax.swing.JTextField } component in GlassPane.
  30  * <p>See base class for details.
  31  */
  32 /*
  33 @test
  34 @summary Simple Overlapping test for javax.swing.JLabel
  35 @author sergey.grinev@oracle.com: area=awt.mixing
  36 @library ../../regtesthelpers
  37 @modules java.desktop/sun.awt
  38          java.desktop/java.awt.peer
  39 @build Util
  40 @run main JTextFieldInGlassPaneOverlapping
  41  */
  42 public class JTextFieldInGlassPaneOverlapping extends GlassPaneOverlappingTestBase {
  43 
  44     @Override
  45     protected JComponent getSwingComponent() {
  46         JTextField ch = new JTextField();
  47         ch.setPreferredSize(new Dimension(50, 50));
  48         ch.setText("Swing component");
  49         return ch;
  50     }
  51 
  52     // this strange plumbing stuff is required due to "Standard Test Machinery" in base class
  53     public static void main(String args[]) throws InterruptedException {
  54         instance = new JTextFieldInGlassPaneOverlapping();
  55         OverlappingTestBase.doMain(args);
  56     }
  57 }