0

Hello everybody.
I'm new to java programming. These days I'm developing a client server application using java. Client side is at most finish now. Server side logic is also designed and implemented successfully.
But I'm in a trouble regarding following stuff.

The server runs an infinite loop. it always checking for incoming request. I need to add tow buttons on my interface "Start" and "Stop" so that user can start the server and stop it when he want.
I added my server logic to start buttons click event. and set a global variable which can be reset by stop button.
But the problem is because of infinite loop I'm unable to click the stop button once the server is started. Even close or minimize buttons dose not work......
Please help me....

I guess I may want to work with thrads in order to solve this problem. I refered some articals on java threads. but Still I can't understand how threads can help me.

If you can recommand a link, it would be better
Any answer will be highly appreciated

Thanks in advance
Thilina............

Edited by thilinam: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by JamesCherrill
0

Perform you function in a Swing Worker Thread, not on the Event Dispatch Thread. I have no time to explain this now, but Google will help.

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.