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 ) ; |