int lastSelCopy = lastSel; if (lastSelCopy!=-1) { lastSel = -1; listData.remove(lastSelCopy); listModel.removeElementAt(lastSelCopy); autList.setSelectedIndex(listModel.getSize()-1); if (listModel.getSize()<=1) delAut.setEnabled(false); }
results.setText(""); insertResults("Welcome!");
            public void actionPerformed(ActionEvent e) {                int lastSelCopy = lastSel;                if (lastSelCopy!=-1) {                    lastSel = -1;                    listData.remove(lastSelCopy);                    listModel.removeElementAt(lastSelCopy);                    autList.setSelectedIndex(listModel.getSize()-1);                    if (listModel.getSize()<=1)                        delAut.setEnabled(false);                }            }