CS 202 - Computer Science II - Spring 2006
Lab 6 - Swing GUIs


Loyola College > Department of Computer Science > Dr. James Glenn > CS 202 > Labs > Lab 6

Due

Wednesday, March 22nd at 11:59pm. Labs submitted one day late will be assessed a 20% penalty. Labs will not be accepted more than one day late.

Objectives

Reading

Anderson & Franceshi, Chapter 12

Assignment


As of 11:25am 3/16/2006 there is a server running on gunpowder.cs.loyola.edu at port 4501.
This applet should be able to connect to that server.

Complete the code for the GUIChatClient class. You will have to delcare and instantiate the components, arrange them in the panels, and write, instantiate, and register the listener classes and objects.

Files

Start with the code in the incomplete version of GUIChatClient.java.

Advice

Exercises

Do two of the following three exercises.
  1. Suppose we wish to add the ability for users to send private messages to another user of the chat room. What additional components would we have to add to the interface? Draw a diagram showing the existing panels and any new panels you would create, indicating the location of the new components.
  2. In addition to the additional components needed to allow private messages, the protocol used to communicate between the server and the client would need to be updated so that the server could distinguish the private messages from the public messages. Discuss how the protocol could be changed and implemented.
  3. All of the messages in our chat system go through a central server, which could store a transcript of everything that was said. Is keeping such a transcript a good idea or a bad idea? Discuss the ethical implications.

Submissions

Submit the source code (.java file) for your completed GUIChatClient class.