Exercise 3?
Containers and Components
Analyse the BallWorld.java example from Unit 2 and answer the following
questions:
1.
How
many AWT component types are there in the example and what are they?
2.
Are
there any containers used in this example, if so what are they?
3.
What is
a?Java AWT container?
4.
Is a
container also a component?
5.
Is a
component also a container?
6.
What
messages are sent to the Ball object?
7.
What
messages are sent to the Frame object?
8.
Will
the BallWorld Frame window close if the top right hand button is clicked?
Discussion of Exercise 3
Back to content |