Basic HTML version of Foils prepared March 26 1999

Foil 12 Nesting Layouts with Panels

From Java Academy:Graphical User Interface NPAC Java Academy February--April 99 -- March 1999. by Nancy McCracken


1 Each of the subareas in a Layout can itself be subdivided according to some other Layout.
2 For each area that you want to subdivide, introduce a Panel: Panel panel1 = new Panel ( ) ;
3 A Panel area is like an Applet area in that you can set a Layout and add components. panel1.setLayout ( new GridLayout ( 5, 2 ) ) ; panel1.add ( button1 ); panel1.add ( button2 );
4 After adding components to the Panel, add the whole panel to the applet: add ( panel1 ) ;

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Mar 26 1999