本文整理汇总了Java中java.awt.GridLayout.setColumns方法的典型用法代码示例。如果您正苦于以下问题:Java GridLayout.setColumns方法的具体用法?Java GridLayout.setColumns怎么用?Java GridLayout.setColumns使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.GridLayout
的用法示例。
在下文中一共展示了GridLayout.setColumns方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import java.awt.GridLayout; //导入方法依赖的package包/类
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
double[][] size = {{5, TableLayout.FILL, 5},
{5, TableLayout.FILL, 5}};
this.setLayout(new TableLayout(size));
final GridLayout gridLayout3 = new GridLayout();
JPanel child = new JPanel(gridLayout3);
this.setSize(351, 105);
gridLayout3.setRows(3);
gridLayout3.setColumns(2);
gridLayout3.setHgap(5);
gridLayout3.setVgap(5);
child.add(getJRadioButton(), null);
child.add(getJRadioButton1(), null);
child.add(getJRadioButton2(), null);
child.add(getJRadioButton3(), null);
child.add(getJRadioButton4(), null);
child.add(getJTextField(), null);
this.add(child, "1,1");
}
示例2: aumentarNrDeCampos
import java.awt.GridLayout; //导入方法依赖的package包/类
/**
* Metodo usado para aumentar nr de campos para adiccao de values
*/
private void aumentarNrDeCampos(boolean aumentar) {
GridLayout layout = (GridLayout) pnMatriz.getLayout();
layout.setColumns(this.numeroDeVar + 1);
layout.setRows(this.numeroDeVar);
this.gerarCampos(aumentar);
pnMatriz.setLayout(layout);
pnMatriz.validate();
}