CIS 163 AA - Java Programming I - Section 5811
Worksheet #3
Due
Monday, October 3, 2005
Name:
I. Definitions: please explain the following terms:
- parameter
- dot operator
- alias
- legacy system
- Autoboxing
- component
- label
- layout manager
II. Question or short essay
- What happens when Java performs automatic garbage collection?
- What does the String method toLowerCase() do?
- What is the purpose of the Java swing class?
- What is the purpose of the setPreferredSize() method of a panel?
- What is the purpose of the add() method of a container?
- What is the purpose of the pack() method of a frame?
- How do you format a decimal value to 2 decimal places when you print it?
III. Programming Exercises Write source code for the following:
Modify the LabelDemo program on page 149 so that it displays a fourth
label, with the text of the label centered above the image.