开发者

GridLayout. Check the amount of cells used

开发者 https://www.devze.com 2023-02-15 01:02 出处:网络
After creating the grill with \"GridLayout\": supper(new GridLayout(rows, column)); I will add to demand content in开发者_如何学JAVA each cell:

After creating the grill with "GridLayout":

supper(new GridLayout(rows, column));

I will add to demand content in开发者_如何学JAVA each cell:

public void addButton(String name) {
 buttons = new JButton(name);
 add(buttons);
}

As I can I know the current number of cells used to keep a counter of addition and deletion?.

Thanks.


You could check with Container.getComponentCount().

0

精彩评论

暂无评论...
验证码 换一张
取 消