Package abbot.tester

Examples of abbot.tester.ComponentTester.actionFocus()


        tf.setColumns(10);
        KeyWatcher kw = new KeyWatcher();
        tf.addKeyListener(kw);
        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);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.