else { System.out.println("SpriteEditor: WARNING: Uncaught action: " + ae.getActionCommand()); }
    public void actionPerformed(ActionEvent ae)    {        if (ae.getActionCommand().equals(selector.getActionCommand()))        {            showInfo(HackModule.getNumberOfString(selector.getSelectedItem()                .toString(), false));        }        else if (ae.getActionCommand().equals("apply"))        {            saveInfo(HackModule.getNumberOfString(selector.getSelectedItem()                .toString(), false));        }        else if (ae.getActionCommand().equals("close"))        {            hide();        }        else if (ae.getActionCommand().equals("palNumChanged"))        {            changePalette(palNum.getSelectedIndex());        }        else if (ae.getActionCommand().equals("hFlip"))        {            spriteDrawingArea.doHFlip();        }        else if (ae.getActionCommand().equals("vFlip"))        {            spriteDrawingArea.doVFlip();        }        else if (ae.getActionCommand().equals("undo"))        {            spriteDrawingArea.undo();            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals("cut"))        {            spriteDrawingArea.cut();            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals("copy"))        {            spriteDrawingArea.copy();            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals("paste"))        {            spriteDrawingArea.paste();            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals("delete"))        {            spriteDrawingArea.delete();            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals(showRepeats.getActionCommand()))        {            initSelector(showRepeats.isSelected());            selector.updateUI();        }        else if (ae.getActionCommand().equals(gridLines.getActionCommand()))        {            spriteDrawingArea.setDrawGridlines(gridLines.isSelected());            spriteDrawingArea.repaint();        }        else if (ae.getActionCommand().equals("Find"))        {            search(search.getText().toLowerCase(), selector);        }        else if (ae.getActionCommand().equals("setBgColor"))        {            setBgCol(JColorChooser.showDialog(null,                "Select a new background color", SpriteEditor.bgColor));        }        else if (ae.getActionCommand().equals("spal"))        {            int cnum = spal.getSelectedColorIndex();            Color col = spal.getNewColor();            if (cnum == 0)                setBgCol(col);            else                this.changePaletteCol(cnum, col);        }        else if (ae.getActionCommand().equals("importImg"))        {            importImg();        }        else if (ae.getActionCommand().equals("exportImg"))        {            exportImg();        }        else if (ae.getActionCommand().equals("jumpSPT"))        {            JHack.main.showModule(SPTEditor.class, new Integer(                getSpriteInfo(HackModule.getNumberOfString(selector                    .getSelectedItem().toString(), false)).sptNum));        }    }