int sel = classpathEntryList.getSelectedIndex(); if (sel <= 0) return;
int[] selIndices = classpathEntryList.getSelectedIndices(); if (selIndices.length == 0) return;  int lastInsertPos = -1;
    private void classpathUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_classpathUpButtonActionPerformed        int sel = classpathEntryList.getSelectedIndex();        if (sel <= 0)            return;            DefaultListModel model = (DefaultListModel)classpathEntryList.getModel();        model.add(sel-1, model.remove(sel));        classpathEntryList.setSelectedIndex(sel-1);    }//GEN-LAST:event_classpathUpButtonActionPerformed