-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6u23
-
x86
-
windows_7
Windows 7 Professional 64
Lenovo T410 laptop
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Next code does not select the last char:
JFrame frm = new JFrame();
frm.getContentPane().add(new JTextField("some text"));
frm.setSize(200, 200);
frm.setVisible(true);
new Thread(new Runnable() {
public void run() {
try {
try {
Thread.sleep(6000);
} catch (InterruptedException ex) {
}
Robot robot = new Robot();
robot.keyPress(java.awt.event.KeyEvent.VK_END);
robot.keyRelease(java.awt.event.KeyEvent.VK_END);
robot.keyPress(java.awt.event.KeyEvent.VK_SHIFT);
robot.keyPress(java.awt.event.KeyEvent.VK_LEFT);
robot.keyRelease(java.awt.event.KeyEvent.VK_LEFT);
robot.keyRelease(java.awt.event.KeyEvent.VK_SHIFT);
} catch (AWTException ex) {
ex.printStackTrace();
}
}
}).start();
Works fine on linux and windows versions other than 7.
Lenovo T410 laptop
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Next code does not select the last char:
JFrame frm = new JFrame();
frm.getContentPane().add(new JTextField("some text"));
frm.setSize(200, 200);
frm.setVisible(true);
new Thread(new Runnable() {
public void run() {
try {
try {
Thread.sleep(6000);
} catch (InterruptedException ex) {
}
Robot robot = new Robot();
robot.keyPress(java.awt.event.KeyEvent.VK_END);
robot.keyRelease(java.awt.event.KeyEvent.VK_END);
robot.keyPress(java.awt.event.KeyEvent.VK_SHIFT);
robot.keyPress(java.awt.event.KeyEvent.VK_LEFT);
robot.keyRelease(java.awt.event.KeyEvent.VK_LEFT);
robot.keyRelease(java.awt.event.KeyEvent.VK_SHIFT);
} catch (AWTException ex) {
ex.printStackTrace();
}
}
}).start();
Works fine on linux and windows versions other than 7.
- duplicates
-
JDK-4838497 Robot.keyPress(KeyEvent.VK_RIGHT) always types Numpad right arrow key
-
- Open
-