aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to restart a button, bring it to the intial state (actionlistener, threads) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to restart a button, bring it to the intial state (actionlistener, threads)" Watch "How to restart a button, bring it to the intial state (actionlistener, threads)" New topic
Author

How to restart a button, bring it to the intial state (actionlistener, threads)

zhe zen
Greenhorn

Joined: Jun 05, 2009
Posts: 1
Hi,

I am adapting an applet from some open source code to my need and have a problem with reseting the its applet to the initial state.
The Applet has two buttons: "Run" and "Reset".
runbutton starts an algorithm, which is in a runnable class.
resetbutton is currently just reseting the parameters of this algorithm to the intial state.

I would like to reset the applet with a button, so that when i press the runbutton the applet is just at the same stage as befor pressing the start button for the first time.

Here the crucial parts of the code:



The network class:



Thanks a lot for all help.

Zhe
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

Please Use Code Tags. You can edit your post to add them.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to restart a button, bring it to the intial state (actionlistener, threads)