Application hangs without triggering any Key Events, when Key is pressed on a list which is selected.
Compile and run SelectListKeyTest.java
It will have a frame with TextArea, List, TextField
Mouse will be moved over each Component and clicked and then Key is pressed
For the first loop, MouseEvents and KeyEvents are triggered for all components
When key is pressed on already selected list, for second time, only MouseEvents are triggered, and application hangs.
When we move the mouse slowly, the program continue to execute
In SelectListKeyTest.java, uncomment the line - list.select(0);
and then compile and run, it will not hang.
Compile and run SelectListKeyTest.java
It will have a frame with TextArea, List, TextField
Mouse will be moved over each Component and clicked and then Key is pressed
For the first loop, MouseEvents and KeyEvents are triggered for all components
When key is pressed on already selected list, for second time, only MouseEvents are triggered, and application hangs.
When we move the mouse slowly, the program continue to execute
In SelectListKeyTest.java, uncomment the line - list.select(0);
and then compile and run, it will not hang.