![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e853. Laying Out Components in a GridWhen components are added to the container, they fill the grid left-to-right, top-to-bottom.int rows = 2; int cols = 2; JPanel panel = new JPanel(new GridLayout(rows, cols)); panel.add(component1); panel.add(component2);
e851. Separating Components in a Row or Column e852. Laying Out Components in a Flow (Left-to-Right, Top-to-Bottom) e854. Laying Out Components Using Absolute Coordinates © 2002 Addison-Wesley. |