JButton disable issue
843806May 24 2007 — edited May 25 2007I have a small swing app, which have couple of buttons. One of the button involves a five minute processing. During this time, I have disabled the button and removed the action Listener. Even though the button remains faded during the process, If the user clicks on the button ( while remaining faded) , the proces starts all over again, after the end of the current process.
button.removeActionListerner(listener)
button.setEnabled(false)
paint(getGraphics())
processData()
button.setEnabled(true)
button.addActionListener(listener)
paint(getGraphics())
Any ideas ? Thanks