< prev index next >

test/javax/swing/JButton/PressedButtonRightClickTest.java

Print this page
rev 14989 : 8160974: [TESTBUG] Mark more headful tests with @key headful.


  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.AWTException;
  26 import java.awt.BorderLayout;
  27 import java.awt.Point;
  28 import java.awt.Robot;
  29 import java.awt.event.InputEvent;
  30 import javax.swing.JButton;
  31 import javax.swing.JFrame;
  32 import javax.swing.SwingUtilities;
  33 
  34 /*
  35  * @test

  36  * @bug  8049069
  37  * @summary Tests whether right mouse click releases a pressed JButton
  38  */
  39 
  40 public class PressedButtonRightClickTest {
  41 
  42     private static Robot testRobot;
  43     private static JFrame myFrame;
  44     private static JButton myButton;
  45 
  46     public static void main(String[] args) throws Throwable {
  47 
  48         SwingUtilities.invokeAndWait(new Runnable() {
  49 
  50             @Override
  51             public void run() {
  52                 constructTestUI();
  53             }
  54         });
  55 




  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.AWTException;
  26 import java.awt.BorderLayout;
  27 import java.awt.Point;
  28 import java.awt.Robot;
  29 import java.awt.event.InputEvent;
  30 import javax.swing.JButton;
  31 import javax.swing.JFrame;
  32 import javax.swing.SwingUtilities;
  33 
  34 /*
  35  * @test
  36  * @key headful
  37  * @bug  8049069
  38  * @summary Tests whether right mouse click releases a pressed JButton
  39  */
  40 
  41 public class PressedButtonRightClickTest {
  42 
  43     private static Robot testRobot;
  44     private static JFrame myFrame;
  45     private static JButton myButton;
  46 
  47     public static void main(String[] args) throws Throwable {
  48 
  49         SwingUtilities.invokeAndWait(new Runnable() {
  50 
  51             @Override
  52             public void run() {
  53                 constructTestUI();
  54             }
  55         });
  56 


< prev index next >