Threading Network code in a Swing Application

For my final High school project i have decided to code a Poker game to be played over the network. Problem is, as soon the host starts waiting for a client to connect, everything Swing related freezes. A friend of mine said to use Threads.

Strangely enough, when i made a small example class, this did not happen.

Any e-books,ideas examples about threading please?or a solution to this 'freeze' problem?

Message was edited by:

Naks

[468 byte] By [Naksa] at [2007-11-27 6:58:08]
# 1

There is a ton of stuff in these forums and elsewhere on usage of [url=http://en.wikipedia.org/wiki/Swingworker]SwingWorker[/url]. It may be helpful to google this and also open the [url=http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html]Sun tutorials[/url] on concurrency and Swing, and study the the articles.

Good luck!

/Pete

petes1234a at 2007-7-12 18:48:44 > top of Java-index,Java Essentials,Java Programming...