| Author |
SWT Thread
|
dushantha Rathnayake
Ranch Hand
Joined: Feb 27, 2010
Posts: 100
|
|
Hi,
I am new to SWT. I got a project to develop a chart that change their values according to time. so the chart must change with the time. To do this changing part I used a thread. The program is work with thread correctly but I cant do any other operations.It means the program only do the chart changing part (no multi process) so what I want to do now. I want to do parallel process's.
Thread code:
Please help me.
Thank you.
|
 |
Hussein Mhanna
Greenhorn
Joined: Dec 02, 2010
Posts: 2
|
|
you didn't start your thread.
final Thread applicationThread = new Thread("applicationThread") {
public void run() {
while(threadController==true){
try {
display.syncExec(print);
Thread.sleep(1000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
};
applicationThread.start();
|
 |
dushantha Rathnayake
Ranch Hand
Joined: Feb 27, 2010
Posts: 100
|
|
Hi,
Sorry for the late. Actually my Thread is start in another section.It is ok. The problem is after start the Thread cant do other activities. Simply think this, I want to do an animation using a thread.I want to use tow threads.Using first thread i want to print "First thread" after one second i want print this again. I want to continue this process with the time.Using second thread I want to print "Second Thread" after two seconds I want to print "Second Thread" Again. I want to continue this process as earlier process. The Out put should be following.
So tell me now haw can I do this.Actually I want to do this using SWT Threads. Please help me.
Thank you.
|
 |
 |
|
|
subject: SWT Thread
|
|
|