if ((sel < 0) || (sel == (model.getSize()-1))) return;  model.add(sel+1, model.remove(sel)); classpathEntryList.setSelectedIndex(sel+1);
int lastInsertPos = model.getSize(); for (int i = selIndices.length-1; i >= 0; i--) { int sel = selIndices[i]; if ((sel+1) < lastInsertPos) { model.add( sel + 1, model.remove(sel)); selIndices[i] = sel + 1; } lastInsertPos = selIndices[i]; }  classpathEntryList.setSelectedIndices(selIndices);
    private void classpathDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_classpathDownButtonActionPerformed        int sel = classpathEntryList.getSelectedIndex();        DefaultListModel model = (DefaultListModel)classpathEntryList.getModel();        if ((sel < 0) || (sel == (model.getSize()-1)))            return;            model.add(sel+1, model.remove(sel));        classpathEntryList.setSelectedIndex(sel+1);    }//GEN-LAST:event_classpathDownButtonActionPerformed