Sams Teach Yourself J2EE™ in 21 Days, Second Edition
by Martin Bond, Dan Haywood, Debbie Law, Andy Longshaw, Peter Roxburgh
Exercise
To extend your knowledge of the subjects covered today, try the following exercise.
Create a chat room application. Participants provide their name and can send messages. Participants read messages posted by all other participants.
To assist you in this task, three Java files have been provided in the exercise sub-directory for Day 9 on the accompanying Web site.
The Chat.java and ChatDisplay.java files are complete and need not be edited. These files provide the Swing code to enter and display the chat room messages on the screen.
The TopicServer.java is a starting point for you to further develop the chat server. The initial code simply uses the callback method addMessage to bounce the message back to the screen. The addMessage method ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access