| Author |
On Click of Button i want to start and stop execution of a java class.
|
V Patil
Ranch Hand
Joined: Oct 04, 2008
Posts: 36
|
|
On Click of Button i want to start and stop execution of a java class.
say on click of start button run below given code.
and on click of stop i want to execute as.stopRequest();.
Please help .
Thanks in advance
|
 |
V Patil
Ranch Hand
Joined: Oct 04, 2008
Posts: 36
|
|
|
Please helpppppppppppppppppppp.
|
 |
Raffaele Sgarro
Greenhorn
Joined: Nov 05, 2009
Posts: 5
|
|
|
You can't do it that way... Your thread object "as" must be accessible from the outside world, so you have to make it a class or instance member
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12269
|
|
1. This is NOT a distributed Java problem
2. You are having a LOT of misconceptions about Java Threads - try to work through some simple examples first.
3. Study the Java Thread API - for example, your code:
does NOT make Thread t sleep. Go read the API carefully.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: On Click of Button i want to start and stop execution of a java class.
|
|
|