Exercises
Write a simple application which is composed of a Frame containing four buttons.
Experiment with the following methods :
- setBackgroundColor(Color c),
- setTitle(String str),
- setSize(width, height).
Write a simple application composed of a Frame and a Panel that has five buttons. Make each button to change the Frame’s background when pressed.
Write a simple application composed of a Frame and paint into it 9 randomly coloured rectangles.