test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java

Print this page

        

*** 20,30 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! @bug 8001633 @summary Wrong alt processing during switching between windows @author mikhail.cherkasov@oracle.com @run main WrongAltProcessing */ --- 20,30 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! @bug 8001633 8028271 @summary Wrong alt processing during switching between windows @author mikhail.cherkasov@oracle.com @run main WrongAltProcessing */
*** 74,84 **** robot.setAutoDelay(100); } private static void clickWindowsTitle(JFrame frame) { Point point = frame.getLocationOnScreen(); ! robot.mouseMove(point.x + (frame.getWidth() / 2), point.y + 5); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); } public static void runScript() { --- 74,84 ---- robot.setAutoDelay(100); } private static void clickWindowsTitle(JFrame frame) { Point point = frame.getLocationOnScreen(); ! robot.mouseMove(point.x + (frame.getWidth() / 2), point.y + 10); robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); } public static void runScript() {
*** 110,119 **** --- 110,120 ---- } public static void createWindows() { firstFrame = new JFrame("Frame"); firstFrame.setLayout(new FlowLayout()); + firstFrame.setPreferredSize(new Dimension(600,100)); JMenuBar bar = new JMenuBar(); JMenu menu = new JMenu("File"); JMenuItem item = new JMenuItem("Save");
*** 144,153 **** --- 145,155 ---- firstFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); firstFrame.pack(); secondFrame = new JFrame("Frame 2"); + secondFrame.setPreferredSize(new Dimension(600,100)); secondFrame.setLocation(0, 150); secondFrameTf = new JTextField(20); secondFrame.add(secondFrameTf); secondFrame.pack(); SwingUtilities.invokeLater(new Runnable() {