< prev index next >

test/javax/swing/JRootPane/4670486/bug4670486.java

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

This is a backport of fe58d505fffd from jdk9. 228/596 hunks apply without
modifications. 16 hunks required manual rework. The remainder were for files
not present in jdk8u.


  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 import java.awt.*;
  25 import java.awt.event.*;
  26 import javax.swing.*;
  27 import sun.awt.SunToolkit;
  28 
  29 /**
  30  * @test

  31  * @bug 4670486
  32  * @author Mark Davidson
  33  * @summary Regression: Popup menu bindings doesn't work when a default button has been defined.
  34  * @library ../../regtesthelpers
  35  * @build Util
  36  * @run main bug4670486
  37  */
  38 public class bug4670486 {
  39 
  40     public static volatile boolean actionExpected = false;
  41     public static volatile boolean actionRecieved = false;
  42 
  43     private static JMenuBar createMenuBar() {
  44         JMenuBar menubar = new JMenuBar();
  45 
  46         // Control with unique menu
  47         JMenu menu = new JMenu("Unique Menu");
  48         menu.setMnemonic('U');
  49         menu.add(createMenuItem("Sunday", 'S'));
  50         menu.add(createMenuItem("Monday", 'M'));




  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 import java.awt.*;
  25 import java.awt.event.*;
  26 import javax.swing.*;
  27 import sun.awt.SunToolkit;
  28 
  29 /**
  30  * @test
  31  * @key headful
  32  * @bug 4670486
  33  * @author Mark Davidson
  34  * @summary Regression: Popup menu bindings doesn't work when a default button has been defined.
  35  * @library ../../regtesthelpers
  36  * @build Util
  37  * @run main bug4670486
  38  */
  39 public class bug4670486 {
  40 
  41     public static volatile boolean actionExpected = false;
  42     public static volatile boolean actionRecieved = false;
  43 
  44     private static JMenuBar createMenuBar() {
  45         JMenuBar menubar = new JMenuBar();
  46 
  47         // Control with unique menu
  48         JMenu menu = new JMenu("Unique Menu");
  49         menu.setMnemonic('U');
  50         menu.add(createMenuItem("Sunday", 'S'));
  51         menu.add(createMenuItem("Monday", 'M'));


< prev index next >