test/java/awt/Modal/LWModalTest/LWModalTest.java

Print this page




  23 
  24 /*
  25   @test
  26   @bug 6178755
  27   @summary The test checks that Container's method startLWModal
  28 and stopLWModal work correctly. The test scenario is very close
  29 to JOptionPane.showInternal*Dialog methods
  30   @author artem.ananiev@...: area=awt.modal
  31   @library ../../regtesthelpers
  32   @build Util
  33   @run main LWModalTest
  34 */
  35 
  36 import java.awt.*;
  37 import java.awt.event.*;
  38 
  39 import java.lang.reflect.*;
  40 
  41 import javax.swing.*;
  42 
  43 import sun.awt.*;
  44 
  45 import test.java.awt.regtesthelpers.Util;
  46 
  47 public class LWModalTest
  48 {
  49     private static JFrame frame;
  50     private static volatile JInternalFrame internalFrame;
  51 
  52     private static volatile boolean passed = false;
  53 
  54     private static void init()
  55     {
  56         frame = new JFrame("JFrame");
  57         frame.setBounds(100, 100, 320, 240);
  58         frame.setVisible(true);
  59         Util.waitForIdle(null);
  60 
  61         new Thread(new Runnable()
  62         {
  63             public void run()
  64             {




  23 
  24 /*
  25   @test
  26   @bug 6178755
  27   @summary The test checks that Container's method startLWModal
  28 and stopLWModal work correctly. The test scenario is very close
  29 to JOptionPane.showInternal*Dialog methods
  30   @author artem.ananiev@...: area=awt.modal
  31   @library ../../regtesthelpers
  32   @build Util
  33   @run main LWModalTest
  34 */
  35 
  36 import java.awt.*;
  37 import java.awt.event.*;
  38 
  39 import java.lang.reflect.*;
  40 
  41 import javax.swing.*;
  42 


  43 import test.java.awt.regtesthelpers.Util;
  44 
  45 public class LWModalTest
  46 {
  47     private static JFrame frame;
  48     private static volatile JInternalFrame internalFrame;
  49 
  50     private static volatile boolean passed = false;
  51 
  52     private static void init()
  53     {
  54         frame = new JFrame("JFrame");
  55         frame.setBounds(100, 100, 320, 240);
  56         frame.setVisible(true);
  57         Util.waitForIdle(null);
  58 
  59         new Thread(new Runnable()
  60         {
  61             public void run()
  62             {