< prev index next >

test/jdk/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java

Print this page
rev 59106 : imported patch client


  29   @author andrei.dmitriev: area=awt.menu
  30   @library ../../regtesthelpers
  31   @library /test/lib
  32   @modules java.desktop/sun.awt
  33   @build jdk.test.lib.Platform
  34   @build Util
  35   @run main OpensWithNoGrab
  36 */
  37 
  38 import java.awt.*;
  39 import java.awt.event.*;
  40 
  41 import jdk.test.lib.Platform;
  42 import test.java.awt.regtesthelpers.Util;
  43 
  44 public class OpensWithNoGrab
  45 {
  46     final static int delay = 50;
  47     private static void init()
  48     {
  49         if (!(Platform.isLinux() || Platform.isSolaris())) {
  50             System.out.println("This test is for XAWT/Motif only");
  51             OpensWithNoGrab.pass();
  52         }
  53 
  54         Choice ch = new Choice ();
  55         Frame f = new Frame ("OpensWithNoGrab");
  56         Robot robot;
  57         Point framePt, choicePt;
  58 
  59         ch.add("line 1");
  60         ch.add("line 2");
  61         ch.add("line 3");
  62         ch.add("line 4");
  63         ch.setBackground(Color.red);
  64         f.add(ch);
  65 
  66         Menu file = new Menu ("file");
  67         MenuBar mb = new MenuBar();
  68         mb.add(file);
  69 




  29   @author andrei.dmitriev: area=awt.menu
  30   @library ../../regtesthelpers
  31   @library /test/lib
  32   @modules java.desktop/sun.awt
  33   @build jdk.test.lib.Platform
  34   @build Util
  35   @run main OpensWithNoGrab
  36 */
  37 
  38 import java.awt.*;
  39 import java.awt.event.*;
  40 
  41 import jdk.test.lib.Platform;
  42 import test.java.awt.regtesthelpers.Util;
  43 
  44 public class OpensWithNoGrab
  45 {
  46     final static int delay = 50;
  47     private static void init()
  48     {
  49         if (!Platform.isLinux()) {
  50             System.out.println("This test is for XAWT/Motif only");
  51             OpensWithNoGrab.pass();
  52         }
  53 
  54         Choice ch = new Choice ();
  55         Frame f = new Frame ("OpensWithNoGrab");
  56         Robot robot;
  57         Point framePt, choicePt;
  58 
  59         ch.add("line 1");
  60         ch.add("line 2");
  61         ch.add("line 3");
  62         ch.add("line 4");
  63         ch.setBackground(Color.red);
  64         f.add(ch);
  65 
  66         Menu file = new Menu ("file");
  67         MenuBar mb = new MenuBar();
  68         mb.add(file);
  69 


< prev index next >