Exercises
September 22 - September 25, 2006
- Experiment with class GUI
1. Change the color of the panel
2. Change the size of the panel
3. See what happens if you do not “pack”
4. See what happens if you do not make visible
5. Add a second label of a different color
- Compile and run GUIWButton.
- Create a GUI with a label and text field.
Allow the user to enter text in the text field. When the user presses
enter, update the text of
the label to be the text contained in the text field.
- Add a button
to the program you wrote for exercise 3. When the user presses the
button OR presses enter, update the text of the label
to be the text
contained in the text field.
- Modify your program from exercise 4 to
keep a count of the number of times you have changed the label.
Sami Rollins