I have a JButton in my Java Applet. After pressing it, ActionListener have to make huge amount of actions. So, because of it, when user clicks the button, it "stay pressed" for a while (sometimes even 5 minuts) instead of disable itself immidiately (it disable itself after these 5 minuts).
public void actionPerformed(ActionEvent e) {
JButton.setEnabled(false);
//...
}
I don't want user to see that. I would like all these action execute in the background. What can I do to achive it?