7039403: Could not compile test/javax/swing/JLabel/6596966/bug6596966.java

Reviewed-by: malenkov
This commit is contained in:
Pavel Porvatov 2011-04-27 13:43:22 +04:00
parent 58aa826b31
commit aa161ffe8d

View File

@ -24,13 +24,13 @@
/* @test
@bug 6596966
@summary Some JFileChooser mnemonics do not work with sticky keys
* @library ../../regtesthelpers
* @build Util
@run main bug6596966
@author Pavel Porvatov
*/
import sun.awt.SunToolkit;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
@ -44,6 +44,7 @@ public class bug6596966 {
public static void main(String[] args) throws Exception {
Robot robot = new Robot();
SunToolkit toolkit = (SunToolkit) SunToolkit.getDefaultToolkit();
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
@ -68,17 +69,17 @@ public class bug6596966 {
}
});
Util.blockTillDisplayed(frame);
toolkit.realSync();
robot.keyPress(KeyEvent.VK_ALT);
robot.keyPress(KeyEvent.VK_L);
robot.waitForIdle();
toolkit.realSync();
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new KeyEvent(label, KeyEvent.KEY_RELEASED,
toolkit.getSystemEventQueue().postEvent(new KeyEvent(label, KeyEvent.KEY_RELEASED,
EventQueue.getMostRecentEventTime(), 0, KeyEvent.VK_L, 'L'));
robot.waitForIdle();
toolkit.realSync();
try {
SwingUtilities.invokeAndWait(new Runnable() {