The last row may contain empty cells if the number of components does not equal the total number of available cells. Each component always fills up the entire available cell area. Both the preferred and minimum sizes of a component are not honored.
cell for button or other compoents
Share this highlighthttp://www.safaribooksonline.com/a/java-programming/26936/