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

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 @compile/module=java.desktop java/awt/Helper.java
  40 @build Util
  41 @run main JTextFieldInGlassPaneOverlapping
  42  */
  43 public class JTextFieldInGlassPaneOverlapping extends GlassPaneOverlappingTestBase {
  44 
  45     @Override
  46     protected JComponent getSwingComponent() {
  47         JTextField ch = new JTextField();
  48         ch.setPreferredSize(new Dimension(50, 50));
  49         ch.setText("Swing component");
  50         return ch;
  51     }
  52 
  53     // this strange plumbing stuff is required due to "Standard Test Machinery" in base class
  54     public static void main(String args[]) throws InterruptedException {
  55         instance = new JTextFieldInGlassPaneOverlapping();
  56         OverlappingTestBase.doMain(args);
  57     }
  58 }


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 /java/awt/patchlib  ../../regtesthelpers
  37 @modules java.desktop/sun.awt
  38          java.desktop/java.awt.peer
  39 @build java.desktop/java.awt.Helper
  40 @build Util
  41 @run main JTextFieldInGlassPaneOverlapping
  42  */
  43 public class JTextFieldInGlassPaneOverlapping extends GlassPaneOverlappingTestBase {
  44 
  45     @Override
  46     protected JComponent getSwingComponent() {
  47         JTextField ch = new JTextField();
  48         ch.setPreferredSize(new Dimension(50, 50));
  49         ch.setText("Swing component");
  50         return ch;
  51     }
  52 
  53     // this strange plumbing stuff is required due to "Standard Test Machinery" in base class
  54     public static void main(String args[]) throws InterruptedException {
  55         instance = new JTextFieldInGlassPaneOverlapping();
  56         OverlappingTestBase.doMain(args);
  57     }
  58 }