da.setPreferredSize(new Dimension(80, 80));
da.setPreferredSize(new Dimension(81, 81));
    protected void init()    {        mainWindow = createBaseWindow(this);        mainWindow.setTitle(getDescription());        //menu        JMenuBar mb = new JMenuBar();        JMenu fileMenu = new JMenu("File");        fileMenu.setMnemonic('f');        fileMenu.add(HackModule.createJMenuItem("Apply Changes", 'y', "ctrl S",            "apply", this));        fileMenu.addSeparator();        fileMenu.add(HackModule.createJMenuItem("Import...", 'i', null,            "import", this));        fileMenu.add(HackModule.createJMenuItem("Export...", 'e', null,            "export", this));        mb.add(fileMenu);        JMenu editMenu = HackModule.createEditMenu(this, true);        editMenu.addSeparator();        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');        optionsMenu.add(new PrefsCheckBox("Enable Tile Selector Grid Lines",            prefs, "eb.GasStationEditor.tileSelector.gridLines", false, 't',            null, "tileSelGridLines", this));        optionsMenu.add(new PrefsCheckBox(            "Enable Arrangement Editor Grid Lines", prefs,            "eb.GasStationEditor.arrEditor.gridLines", false, 'a', null,            "arrEdGridLines", this));        mb.add(optionsMenu);        mainWindow.setJMenuBar(mb);        //components        tileSelector = new TileSelector()        {            public int getTilesWide()            {                return 34;            }            public int getTilesHigh()            {                return 18;            }            public int getTileSize()            {                return 6;            }            public int getZoom()            {                return 2;            }            public boolean isDrawGridLines()            {                try                {                    return prefs                        .getValueAsBoolean("eb.GasStationEditor.tileSelector.gridLines");                }                catch (NullPointerException e)                {                    return JHack.main.getPrefs().getValueAsBoolean(                        "eb.GasStationEditor.tileSelector.gridLines");                }            }            public int getTileCount()            {                return GasStation.NUM_TILES;            }            public Image getTileImage(int tile)            {                return getSelectedStation().getTileImage(tile,                    getCurrentSubPalette());            }            protected boolean isGuiInited()            {                return true;            }        };        tileSelector.setActionCommand("tileSelector");        tileSelector.addActionListener(this);        arrangementEditor = new GasStationArrangementEditor();        arrangementEditor.setActionCommand("arrangementEditor");        arrangementEditor.addActionListener(this);        dt = new DrawingToolset(this);        pal = new SpritePalette(256, 8, 16);        pal.setActionCommand("paletteEditor");        pal.addActionListener(this);        da = new IntArrDrawingArea(dt, pal, this);        da.setActionCommand("drawingArea");        da.setZoom(10);        da.setPreferredSize(new Dimension(80, 80));        //        mapSelector = createComboBox(gasStationNames, this);        //        mapSelector.setActionCommand("mapSelector");        //        name = new JTextField(15);        palSelector = createJComboBoxFromArray(new String[]{"Regular", "Flash",            "Regular after 1st flash"}, false);        palSelector.setSelectedIndex(0);        palSelector.setActionCommand("palSelector");        palSelector.addActionListener(this);        fi = new FocusIndicator();        JButton copyPal = new JButton("Copy Palette");        copyPal.setActionCommand("copyPal");        copyPal.addActionListener(this);        JButton pastePal = new JButton("Paste Palette");        pastePal.setActionCommand("pastePal");        pastePal.addActionListener(this);        Box center = new Box(BoxLayout.Y_AXIS);        center.add(createFlowLayout(dt));        center.add(Box.createVerticalStrut(10));        center.add(getLabeledComponent("Palette: ", palSelector));        center.add(Box.createVerticalStrut(10));        center.add(createFlowLayout(da));        center.add(Box.createVerticalStrut(5));        center.add(createFlowLayout(pal));        center.add(createFlowLayout(new JButton[]{copyPal, pastePal}));        center.add(Box.createVerticalStrut(10));        center.add(createFlowLayout(fi));        center.add(Box.createVerticalGlue());        JPanel display = new JPanel(new BorderLayout());        display.add(pairComponents(center, null, false), BorderLayout.CENTER);        display.add(pairComponents(tileSelector, arrangementEditor, false),            BorderLayout.WEST);        mainWindow.getContentPane().add(new JScrollPane(display),            BorderLayout.CENTER);        mainWindow.pack();    }