application hanging

J

jonnybravo

i am writing a chat application, when i press a button to disconnect from
the server it removes the user from all JTrees then closes the io streams
and socket.
i am also using a thread to hold messages coming in on the input stream

when i press the button the application just freezes like it it is waiting
for something.

i tried closing the thread, because i thought thread.stop() didnt make any
difference. Could it have something to do with the JTree.
 
C

Corey Brown

jonnybravo said:
i am writing a chat application, when i press a button to disconnect from
the server it removes the user from all JTrees then closes the io streams
and socket.
i am also using a thread to hold messages coming in on the input stream

when i press the button the application just freezes like it it is waiting
for something.

i tried closing the thread, because i thought thread.stop() didnt make any
difference. Could it have something to do with the JTree.

Dump the thread stack and see where you're hanging. On Windows systems
enter Ctrl-Break to dump the stack.

--Corey
 
T

Thomas Weidenfeller

jonnybravo said:
i am writing a chat application, when i press a button to disconnect from
the server it removes the user from all JTrees then closes the io streams
and socket.
i am also using a thread to hold messages coming in on the input stream

when i press the button the application just freezes like it it is waiting
for something.

i tried closing the thread, because i thought thread.stop() didnt make any
difference. Could it have something to do with the JTree.

Get the comp.lang.java.gui FAQ and check the Top 5 list of frequently
asked questions. One might most likely address your problem. Also,
consider working through Sun's GUI and threading tutorials.

And while you are at it, you might want to check the rest of that FAQ,
too, and think about the part where it talks about providing source code..

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top