0

//this is my thread:
public class threadMoveRight implements Runnable{
Storeroom sto = new Storeroom();
String url;
Image image1;
boolean flag;

public threadMoveRight(String purl,Image pImage) {
this.url = purl;
this.image1 = pImage;
}

public void run() {
searchData();
flag = true;
}

}
//and after the user press on right he go to this code :
if (sto.doINeedConection){
while (sto.flag==false){
sleep();
}
}
repaint();
//the result:
//the program stay a lot of time in the sleep

4
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by MattEvans
0

the program stay in the loop and i want that the program will calc the data and go to the internet but it stock....

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.