showFrame(tf);
ComponentTester tester = new ComponentTester();
tester.actionFocus(tf);
int code = KeyEvent.VK_ESCAPE;
int mods = 0;
tester.actionKeyStroke(code, mods);
assertTrue("Never received key press", kw.gotPress);
assertTrue("Never received release", kw.gotRelease);
assertEquals("Wrong key code", code, kw.code);
assertEquals("Wrong modifiers", mods, kw.modifiers);
}