Keeping a JList selection after JList has lost focus?
===

I'm trying to create a form with a JList and a button
What I want to do, is select an item from the JList, and then press the button to perform an action dependant on the selection. However, as soon as the button is clicked, the JList loses focus, and the selection disappears, making the button unable to determine what element was selected in the JList.

Is there a solution to this?
Thanks in advance :)