JButton ActionListener - GUI updates only after JButton is clicked
I'm having a problem with my JButton ActionListener. I have a doTheCleaning() method defined in another class which when called makes series of changes to my GUI. public void doTheCleaning(){ //change image icon //had thread.sleep here //insert to text area //had thread.sleep here //etc } Then in another class, I instantiated the class containing my doTheCleaning() method and had my ActionListener written with my actionperformed() method for my jbutton written like this: public void actionPerformed(ActionEvent e){ //some code //newClass.doTheCleaning(); } I know how to do the rest like