0

Hi guys I have a loop that increases my setsize to 1100 which works fine. My question is is it possiable for when I click my button the loop executes then if I click the button again it does not execute the loop and carry's on with the rest of the functions set for the button?

if (e.getSource() == check) {
   
      
      
     
      for (int i = 900; i < 1100; i++) {
   
          if(i == 1100) break;{
          
setSize(i,700);
} 
          
    

      }
2
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by stultuske
0

well ... one way is to do it in a thread.
first time you click => start
next time you click => sleep

How would I implement it?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.