本文整理匯總了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();
}