This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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: 19216

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


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to restart a button, bring it to the intial state (actionlistener, threads)
 
Similar Threads
Problems with Threads and Applets
reseting combo box values
Reseting socket after few seconds
Problem With RSA Interface
petrol station