Java Exercises
Layout
Managers
|
This
exercise should be carried out after reading the Layout
Managers Tutorial
You should do both of the exercises listed below.
Exercise
1: Layout Manager Design
Exercise
2: Create Layout Managers
Exercise
1: Layout Manager Design
Examine
the picture of the applet below. Perhaps you have already created the
components in the previous exercise. If
this is not the case then go and do that first.
If
this is the case then you can see that your components are arranged differently.
To
correct this arrangement you need to figure out which layout managers to
use. Before diving into your code, I would suggest you think carefully
about the layout and produce a sketch.
Your
sketch should specify any panels or sub panels you are going to have, the
layout manager for each panel and the components that will go into each
panel.
Exercise
2: Create Layout Managers
Using
your design sketch from the first exercise, amend your code appropriately -
using panels and layout managers - so that your applets' GUI looks similar to
the applet shown in the picture above.
Have
fun!
|