Exercise: Creating the Chatclient GUI, Part 3 (Level 2)
                   
In this exercise, you will enhance the GUI for a chat room application. You will complete
the GUI for the ChatClient
               
by adding a Choice component and two menus.
               
Task 1 - Modifying the ChatClient Program
-
Using a text editor, modify the ChatClient source file in the project directory. This class
must implement the GUI design in Figure 12-1 of Level 1.
-
Add the username Choice component under the Send and Quit buttons. This component
enables you to select a name that is posted with every chat line taht you enter. Add
several username options including your full name and a few nicknames, such as
Grand Poobah or Java Geek.
-
Enhance the listeners for the Send button and TextField to write the username to the output
TextArea component.
-
Add the File menu. This menu must include a Quit menu item that terminates the program when
selected.
-
(Optional) Add the Help menu. This menu must include an About menu item that pops up
a simple dialog box, which displays a comment about the program and about you, the developer.
Task 2 - Compiling the ChatClient Program
-
On the command line, use the javac command to compile the ChatClient program.
Task 3 - Running the ChatClient Program
-
On the command line, use the java command to run the ChatClient program.
You should see the GUI shown in Figure 12-1 of Level 1. If your GUI does not look exactly like
the figure, then edit the code to tweak the design to match this figure.