int index = Integer.parseInt(e.getActionCommand());
int index = -1;
    public void actionPerformed(ActionEvent e)    {        int index = Integer.parseInt(e.getActionCommand());        try {           switch (index) {                 case SAVE:                    saveDisplayOptions(); break;                case RESET_DEFAULTS:                    resetDefaults(); break;                case GREY:                case RGB:                case HSB:                    activateRenderingModel(index);                    break;                 }        } catch(NumberFormatException nfe) {               throw new Error("Invalid Action ID "+index, nfe);        }     }