1 | A GridLayout divides the applet area into rows and columns of equal size. |
2 | To get a GridLayout, use the setLayout method in the applet, and make a GridLayout with the number of rows and columns: setLayout ( new GridLayout ( 3, 2 ) ); |
3 | Use the add method to add components in the same order as before, but now |
4 | label |
5 | label |
6 | button |
7 | textfield |
8 | textfield |
9 | they will line up, and they will be made the same size. |