fileMenu.add(HackModule.createJMenuItem("Import sprite from image...", 'm', null, "importImgReal", this)); fileMenu.add(HackModule.createJMenuItem("Export sprite as image...", 'x', null, "exportImgReal", this)); fileMenu.add(new JSeparator());
    protected void init()    {        reset();        mainWindow = createBaseWindow(this);        mainWindow.setTitle(this.getDescription());        mainWindow.getContentPane().add(            new JSearchableComboBox(spriteSelector = createComboBox(                battleSpriteNames, true, this), "Battle Sprite: "),            BorderLayout.NORTH);        spriteSelector.setActionCommand("spriteSelector");        JPanel entry = new JPanel(new BorderLayout());        JPanel entryEast = new JPanel(new BorderLayout());        Box entryNE = new Box(BoxLayout.Y_AXIS);        name = new JTextField(25);        entryNE.add(getLabeledComponent("Name: ", name));        palSelector = createJComboBoxFromArray(new Object[palettes.length],            false);        palSelector.setSelectedIndex(0);        palSelector.setActionCommand("palSelector");        palSelector.addActionListener(this);        palSelector.setEditable(true);        entryNE.add(getLabeledComponent("Palette: ", palSelector,            "Palettes 0-31 real palettes, rest are battle swirl data."));        //        sizeSelector = createJComboBoxFromArray(new String[]{"[01] 32x32",        //            "[02] 32x64", "[03] 64x32", "[04] 64x64", "[05] 128x64",        //            "[06] 128x128"});        sizeSelector = createJComboBoxFromArray(new String[]{"[01] 32x32",            "[02] 64x32", "[03] 32x64", "[04] 64x64", "[05] 128x64",            "[06] 128x128"});        sizeSelector.setActionCommand("sizeSelector");        sizeSelector.addActionListener(this);        entryNE.add(getLabeledComponent("Size: ", sizeSelector));        entryNE.add(HackModule.pairComponents(getLabeledComponent("Zoom: ",            pairComponents(zoom = new JTextField(4), new JLabel("%"), true)),            new JLabel(), false));        zoom.setText("1000");        zoom.getDocument().addDocumentListener(this);        entryEast.add(entryNE, BorderLayout.NORTH);        DrawingToolset dt = new DrawingToolset(this);        entryEast.add(dt, BorderLayout.CENTER);        entry.add(entryEast, BorderLayout.EAST);        pal = new SpritePalette(16);        pal.setPalette(palettes[0]);        pal.setActionCommand("paletteEditor");        pal.addActionListener(this);        JPanel spalWrapper = new JPanel(new FlowLayout());        spalWrapper.add(pal);        entry.add(spalWrapper, BorderLayout.SOUTH);        da = new IntArrDrawingArea(dt, pal);        da.setZoom(10);        //default size for first battle sprite at default zoom (32x32@1000%)        da.setPreferredSize(new Dimension(321, 321));        entry.add(jsp = new JScrollPane(da), BorderLayout.CENTER);        mainWindow.getContentPane().add(entry, BorderLayout.CENTER);        //menu        JMenuBar mb = new JMenuBar();        JMenu fileMenu = new JMenu("File");        fileMenu.setMnemonic('f');        fileMenu.add(HackModule.createJMenuItem("Apply Changes", 'a', null,            "apply", this));        fileMenu.add(new JSeparator());        fileMenu.add(HackModule.createJMenuItem("Import sprite...", 'i', null,            "importImg", this));        fileMenu.add(HackModule.createJMenuItem("Export sprite...", 'e', null,            "exportImg", this));        fileMenu.add(new JSeparator());        fileMenu.add(HackModule.createJMenuItem("Import sprite from .bmp...",            'b', null, "importBmpImg", this));        mb.add(fileMenu);        JMenu editMenu = HackModule.createEditMenu(this, true);        editMenu.add(new JSeparator());        editMenu.add(HackModule.createJMenuItem("H-Flip", 'h', null, "hFlip",            this));        editMenu.add(HackModule.createJMenuItem("V-Flip", 'v', null, "vFlip",            this));        mb.add(editMenu);        JMenu optionsMenu = new JMenu("Options");        optionsMenu.setMnemonic('o');        gridLines = new JCheckBoxMenuItem("Show gridLines");        gridLines.setMnemonic('g');        gridLines.setSelected(true);        gridLines.setActionCommand("gridLines");        gridLines.addActionListener(this);        optionsMenu.add(gridLines);        mb.add(optionsMenu);        mainWindow.setJMenuBar(mb);        mainWindow.pack();    }