![]() |
|
#1
|
|||
|
|||
Threads & draw imagei have a picture that after the user press on the right bottom i need to call to the internet in order to get new data but after i run a thread in order to get new data - my main program not wait fot this thread and call to the internet to get data whan the x and y have an old values - how can i make that the main thread will wait for this thread so the data i will recive will be the new pixcles that is in the right side of the picture?
|
|
#2
|
||||
|
||||
Re: threads & draw imagesee join() in the thread class.
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
problem in the code - always in sleepQuote:
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
|
||||
|
||||
Re: threads & draw imageWhere/how do you start (or call) the thread?
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Stupid Management Policies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 15:46 |
| loading image | asal | FLTK Forum | 5 | 24-Feb-2006 12:43 |
| GIM gidedit - a fltk fluid resize project | cable_guy_67 | FLTK Forum | 2 | 01-Jun-2005 16:00 |
| Checking source codes of image, audio and video files | onauc | C Programming Language | 5 | 26-Feb-2005 22:47 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 07:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The