twocentwhoracle 0 Newbie Poster

So, in my applet, I need to run two threads, each using the same "communicationDriver" class: comIn, and comOut. Each has a socket connecting to port 2002 and 2001 respectively. I init my applet as such:

public void init() {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
makeGUI();}});
}

Then I start both threads as such:

comOut = new CommunicationDriver(IP,2002,this);
comOut.start();


comIn = new CommunicationDriver(IP,2001,this);
comIn.start();
comIn.Listen();

.Listen() is a function that just waits for input in a while(true) loop and updates fields in "this" the applet whenever it gets them. As soon as i call comIn.Listen, though, the applet freezes. I know the event dispatch thread is probably getting blocked by that while loop, but why? I spawned it as a new thread. I need an answer at anyone's earliest convenience please :) if you need any more code from me also i can of course supply with. thank you!