changeset 11096 | a39b7342177f |
parent 10691 | 50cda9bfed7e |
child 12405 | 3a06b392a805 |
--- a/jdk/test/javax/swing/regtesthelpers/Util.java Fri Nov 18 15:49:09 2011 -0800 +++ b/jdk/test/javax/swing/regtesthelpers/Util.java Mon Nov 21 18:22:30 2011 +0400 @@ -140,4 +140,17 @@ return null; } + + /** + * Hits keys by robot. + */ + public static void hitKeys(Robot robot, int... keys) { + for (int i = 0; i < keys.length; i++) { + robot.keyPress(keys[i]); + } + + for (int i = keys.length - 1; i >= 0; i--) { + robot.keyRelease(keys[i]); + } + } }