Eclipse Question:
How to fire a key event in my test code to make the program act as if a user pressed a key?
![Eclipse Interview Answer Eclipse Interview Question](/public/images/interview/34.webp)
Answer:
Two ways to implement it in code: generating OS level key event use Display.post(Event) or use Widge.notifyListeners(...) to just notify a widget's listeners.
Previous Question | Next Question |
How to access UI objects from a non-ui thread? | Why do I get the error "org.eclipse.swt.SWTException: Invalid thread access"? |