Pack the frame
(See Listing 4.) The pack
method is called on the frame after the button is added.
Calling the pack method
- causes the size of the frame to be adjusted
- so as to accommodate
- the picture (the World)
in the CENTER (default position) of the frame
- and the button at the top (NORTH) of the frame.