Nesting Panels

Sometimes what's needed is multiple instances of the same LayoutManager. For instance consider the calculator applet again.

On the one hand this looks like it should be simple to implement in Java. After all it's just eighteen buttons and a TextField. On the other hand although most of the keys are the same size, two of the keys and the TextField are oversized. You could almost use a GridLayout, but not quite. Panels are one way to solve this problem.


Previous | Next | Top
Last Modified April 16, 1998
Copyright 1997, 1998 Elliotte Rusty Harold
elharo@metalab.unc.edu