+ "Also note that this feature is only to be used\n" + "with sprite images exported by JHack and having\n" + "identical palettes.", "Error: Import Failed", JOptionPane.ERROR_MESSAGE);
+ "Previously this feature only\n" + "worked with sprites exported by JHack.\n" + "Now it will change the colors of any other\n" + "imported sprite to match the palette.", "Error: Import Failed", JOptionPane.ERROR_MESSAGE);
    public void importImg(File f)    {        if (f == null)            return;        try        {            if (!f.exists())                throw new FileNotFoundException();            Sprite sp = new Sprite(getSpriteInfo(HackModule.getNumberOfString(                selector.getSelectedItem().toString(), false)), this);            try            {                sp.setImage(ImageIO.read(f));                //this.spriteDrawingArea.setImage(sp.getImage());                this.spriteDrawingArea.setImage(sp.getSpriteByte());                this.spriteDrawingArea.repaint();            }            catch (ArrayIndexOutOfBoundsException e)            {                JOptionPane.showMessageDialog(mainWindow,                    "Image import failed due to an image of invalid size.\n"                        + "Try checking the size of the image "                        + "and changing the size\n"                        + "of the target sprite using the "                        + "SPT editor if necessary.\n"                        + "Also note that this feature is only to be used\n"                        + "with sprite images exported by JHack and having\n"                        + "identical palettes.", "Error: Import Failed",                    JOptionPane.ERROR_MESSAGE);            }        }        catch (IOException e)        {            System.out.println("Unable to read image: " + f.toString());            e.printStackTrace();        }    }