< prev index next >

test/javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java

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


   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 /* @test
  25    @bug 4983388 8015600
  26    @summary shortcuts on menus do not work on JDS
  27    @author Oleg Mokhovikov
  28    @library ../../../../regtesthelpers
  29    @build Util
  30    @run main bug4983388
  31 */


  32 
  33 import java.awt.*;
  34 import javax.swing.*;
  35 import javax.swing.event.MenuListener;
  36 import javax.swing.event.MenuEvent;
  37 import java.awt.event.KeyEvent;
  38 
  39 public class bug4983388 {
  40     static volatile boolean bMenuSelected = false;
  41 
  42     private static class TestMenuListener implements MenuListener {
  43         public void menuCanceled(MenuEvent e) {}
  44         public void menuDeselected(MenuEvent e) {}
  45         public void menuSelected(MenuEvent e) {
  46             System.out.println("menuSelected");
  47             bMenuSelected = true;
  48         }
  49     }
  50 
  51     private static void createAndShowGUI() {




   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 4983388 8015600
  28  * @summary shortcuts on menus do not work on JDS
  29  * @author Oleg Mokhovikov
  30  * @library ../../../../regtesthelpers
  31  * @build Util
  32  * @run main bug4983388
  33  */
  34 
  35 import java.awt.*;
  36 import javax.swing.*;
  37 import javax.swing.event.MenuListener;
  38 import javax.swing.event.MenuEvent;
  39 import java.awt.event.KeyEvent;
  40 
  41 public class bug4983388 {
  42     static volatile boolean bMenuSelected = false;
  43 
  44     private static class TestMenuListener implements MenuListener {
  45         public void menuCanceled(MenuEvent e) {}
  46         public void menuDeselected(MenuEvent e) {}
  47         public void menuSelected(MenuEvent e) {
  48             System.out.println("menuSelected");
  49             bMenuSelected = true;
  50         }
  51     }
  52 
  53     private static void createAndShowGUI() {


< prev index next >