int sel = classpathEntryList.getSelectedIndex();
int[] selIndices = classpathEntryList.getSelectedIndices(); if (selIndices.length == 0) return;
    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