List of usage examples for javax.swing JSpinner setSize
public void setSize(int width, int height)
From source file:Forms.FrmPrincipal.java
private void genCapasOcultas() { pnlCapas.removeAll();//from w w w . j a va 2 s . c om int n = Integer.parseInt(spIntermedias.getValue().toString()) + 2; for (int i = 0; i < n; i++) { JSpinner spinner = new JSpinner(); spinner.setName("capa" + String.valueOf(i)); spinner.setValue(100); spinner.setSize(70, 20); spinner.setVisible(false); spinner.setVisible(true); pnlCapas.add(spinner); if (i == 0) { spinner.setValue(matrizPatrones[0].length - 1); spinner.setEnabled(false); } else if (i == n - 1) { spinner.setValue(String.valueOf(matrizPatrones[0][matrizPatrones[0].length - 1]).length()); spinner.setEnabled(false); } } pnlCapas.setVisible(false); pnlCapas.setVisible(true); }