< prev index next >

test/javax/swing/JPopupMenu/4634626/bug4634626.java

Print this page
rev 14836 : 8159690: [TESTBUG] Mark headful tests with @key headful.
   1 /*
   2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 /* @test
  24    @bug 4634626
  25    @summary Implement context popup menus for components
  26    @author Alexander Zuev
  27    @library ../../../../lib/testlibrary
  28    @build ExtendedRobot
  29    @run applet bug4634626.html
  30 */




  31 import javax.swing.*;
  32 import java.awt.event.*;
  33 import java.awt.*;
  34 
  35 public class bug4634626 extends JApplet {
  36 
  37     public boolean passed = true;
  38     public boolean done = false;
  39 
  40     public JFrame mainFrame = new JFrame("Bug4634626");
  41     public JRootPane rootPane = mainFrame.getRootPane();
  42     public JPanel contentPane = new JPanel();
  43     public JButton nopButton = new JButton("No popup button");
  44     public JTextArea someText = new JTextArea("Some text here", 20, 10);
  45     public JButton popButton = new JButton("Button with the popup");
  46 
  47     public JPopupMenu btnPopup = new JPopupMenu();
  48     public JPopupMenu commonPopup = new JPopupMenu();
  49     static public Error toBeThrown = null;
  50     static int popTrig = MouseEvent.BUTTON3_MASK;


   1 /*
   2  * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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  * @test
  26  * @key headful
  27  * @bug 4634626
  28  * @summary Implement context popup menus for components
  29  * @author Alexander Zuev
  30  * @library ../../../../lib/testlibrary
  31  * @build ExtendedRobot
  32  * @run applet bug4634626.html
  33  */
  34 
  35 import javax.swing.*;
  36 import java.awt.event.*;
  37 import java.awt.*;
  38 
  39 public class bug4634626 extends JApplet {
  40 
  41     public boolean passed = true;
  42     public boolean done = false;
  43 
  44     public JFrame mainFrame = new JFrame("Bug4634626");
  45     public JRootPane rootPane = mainFrame.getRootPane();
  46     public JPanel contentPane = new JPanel();
  47     public JButton nopButton = new JButton("No popup button");
  48     public JTextArea someText = new JTextArea("Some text here", 20, 10);
  49     public JButton popButton = new JButton("Button with the popup");
  50 
  51     public JPopupMenu btnPopup = new JPopupMenu();
  52     public JPopupMenu commonPopup = new JPopupMenu();
  53     static public Error toBeThrown = null;
  54     static int popTrig = MouseEvent.BUTTON3_MASK;


< prev index next >