Ignoring JList selections (read: wanting to ignore them)
Hi all,
I'm continuing my voyage into the wonderful world of Swing and have yet again stumbled on something that is probably very trivial (at least if you know the answer :-)).
the problem situation is the following:
I display a JList with X-rows. Everytime when a user selects a row by clicking on it with the mouse it starts a background process that lasts between 0.1 and 10 seconds. What I want to happen during this time is that the user is not allowed to select any other value in the list until the process has finished.
The current problem is that if the user clicks around the list while this process is running the gui "remembers" each click and executes them after the process has finished in the selected order (kind of queues them up). This of course might be a highly desirable functionality in some cases but makes my app. go Microsoft and that doesn't look good on the UI.
I tried using to set the lists isEnabled to false while the process is executing but this doesn't solve the problem as it still seems to register every click and just waits until the list is enabled again and then executes each one of them.
Ideal outcome: When the user clicks on an item in the list the application ignores every other selection made during the execution of the process.
So maybe something similar to a modal state where you lock the app. while the process is executing.
Thanks in advance to all you good people around the world for at least reading this lengthy description (funny thing this internet, isn't it ?).
Regards,
Kalle

