| 105 | | listPatches.add(cmbBanco.getItem(cmbBanco.getSelectionIndex()) + "-" + |
| 106 | | String.format("%03d", Integer.parseInt(txtPatch.getText())) |
| 107 | | );/* |
| 108 | | ScrollBar sb = listPatches.getVerticalBar(); |
| 109 | | // sb.setMaximum(sb.getMaximum() + sb.getIncrement()); |
| 110 | | listPatches.update(); |
| 111 | | sb.setSelection(sb.getMaximum()); |
| 112 | | System.out.println(sb.getMaximum());*/ |
| | 105 | String nomePatch = cmbBanco.getItem(cmbBanco.getSelectionIndex()) + "-" + |
| | 106 | String.format("%03d", Integer.parseInt(txtPatch.getText())); |
| | 107 | if (listPatches.getSelectionCount() <= 0) { |
| | 108 | listPatches.add(nomePatch); |
| | 109 | listPatches.select(listPatches.getItemCount() - 1); |
| | 110 | } |
| | 111 | else { |
| | 112 | listPatches.add(nomePatch, listPatches.getSelectionIndex() + 1); |
| | 113 | listPatches.setSelection(listPatches.getSelectionIndex() + 1); |
| | 114 | } |
| | 115 | |