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