if (listModel.getSize()<MAX_AUT) { insertNewAut(); } else { newAut.setEnabled(false);
String newName;  if (lastSel!=-1) { newName = JOptionPane.showInputDialog(autWin, java.util.ResourceBundle.getBundle("global").getString("newName"), listModel.elementAt(lastSel)); if (newName==null) return; newName = newName.trim(); for (int i = 0 ; i <  newName.length()  ; i++ ) { if (!Character.isJavaIdentifierPart(newName.charAt(i))) { JOptionPane.showMessageDialog(autWin, java.util.ResourceBundle.getBundle("global").getString("InvalidName"), java.util.ResourceBundle.getBundle("global").getString("Error"), JOptionPane.ERROR_MESSAGE); return; } } listModel.setElementAt(newName, lastSel); autWin.setCurrentName(newName);
            public void actionPerformed(ActionEvent e) {                if (listModel.getSize()<MAX_AUT) {                    insertNewAut();                } else {                    newAut.setEnabled(false);                }            }