List of usage examples for javax.swing JSpinner setVisible
@BeanProperty(hidden = true, visualUpdate = true) public void setVisible(boolean aFlag)
From source file:Forms.FrmPrincipal.java
private void genCapasOcultas() { pnlCapas.removeAll();//from w ww. ja v a 2 s .c o m 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); }