Yes. Place the two button panels in a top panel. Use vertical layout for the content pane. Add the top panel and the result panel.
Layout managers sometimes jam components together
in a way that makes the layout look cramped.
Box can help in this situation.
Box object is a container similar to a panel,
but lacking some features.
The default layout manager of
The previous example programs could be re-written using
in place of
This would slightly simplify the code since it would rely on the
default layout manager rather than specifically setting it.
However, the most useful features of class
its methods that create invisible components.
These components correspond to rectangular areas of the screen.
They are used as spacers to separate the visible components.
If you have ever set type you know how useful spacers are in
creating an attractive page.
To create a fixed-sized invisible component use the method:
Box.createRigidArea( new Dimension( int width, int height ) )
The parameter to