TheGuyNextDoor
TheGuyNextDoor

Reputation: 7937

Disabling JComboBox and retaining original item list

My action listener on a JComboBox invokes a thread. I would like the component to be disabled until the thread completes.

I have tried calling seEnabled(false) when the thread start and setEnabled(true) when it completes. Unfortunately setEnabled(false) clears the combo box list as well.

Is there a way of disabling the component but retain the original list?

Upvotes: 0

Views: 1027

Answers (1)

tom
tom

Reputation: 1037

setEnabled(false) definitely doesn't clear the contents of the combo box. Something else must be going on.

Posting your code might help.

Upvotes: 1

Related Questions