Each of the subareas in a Layout can itself be subdivided according to some other Layout. |
For each area that you want to subdivide, introduce a Panel: Panel panel1 = new Panel ( ) ; |
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 ); |
After adding components to the Panel, add the whole panel to the applet: add ( panel1 ) ; |