The goal for the lab is to add a layout to Conversation and to Ruler so we can take better control of the appearance of the system. We will also move the identify output to the graphics system.

  1. Give Conversation a Grid Layout as discussed in class.

  2. Use a Border Layout in Ruler to set up North, South, East, West and Center sections of the Ruler panel.

  3. We will need at least four, maybe five, labels before we're done so get them all set up with some dummy text while  creating Ruler. Write an initGraphics() method to perform this task, as well as all the other graphics initialization such as setting size and color. For example one thing initGraphics() should do is create a picLabel with some dummy text, say "Picture Area", and add it to the West section via add(picLabel, BorderLayout.WEST). The North section should be the "ID Area", the Center the "Talking Area", and the South the "Reporting Area". Call the East section a "Sound Area" for now.

  4.  In identify(), set the picture via picLabel.setIcon(the pic you want). Use picLabel.setText(the text you want) to include a brief caption. The caption can be relatively informal, e.g. Our noted King (or Queen or Emperor) or whatever. Notice the name is not needed here.

  5. This LabelDemo class may be helpful when it comes to centering the label, or in placing text relative to a picture.

  6. Center all the labels, and in the case of picLabel, center the caption under the picture.

  7. Also in identify() set the text of idLabel to be the combined formal title, name and country of the Ruler.

  8. The Rulers are now identifying themselves in the graphics display. Remove the println part of identify if you haven't already.

  9. Be sure all new (and existing) code is properly documented. We expect you to do this from now on without my having to remind you. We won't necessarily grade the documentation every time, but we will on occasion.

  10. Send Conversation and Ruler to your partner and to me.

  11.  See Part 2