This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
An applet is only allowed to make network connections to the host where it came from. So if the applet is hosted at www.xyz.com, and the chat server is at www.xxyyzz.com, the connection is not permitted. That's one of the consequences of applets living in a "sandbox" inside the browser. Have a look at the Applet FAQ for ways to get around those restrictions.