outsidePic = createComboBox(sptNames, false, this),
outsidePic = createComboBox(sptNames, true, this),
    protected void init()    {        readFromRom();        mainWindow = createBaseWindow(this);        mainWindow.setTitle(this.getDescription());        mainWindow.setIconImage(((ImageIcon) this.getIcon()).getImage());        //mainWindow.setSize(550, 400);        mainWindow.setResizable(false);        selector = EnemyEditor.createEnemyComboBox(this);        selector.setActionCommand("enemySelector");        //		JButton searchb = new JButton("Find");        //		searchb.addActionListener(this);        mainWindow.getContentPane().add(            new JSearchableComboBox(selector, "Enemy: "),            //			pairComponents(            //				pairComponents(search = new JTextField(10), searchb, true),            //				getLabeledComponent("Enemy:", selector),            //				true),            BorderLayout.NORTH);        JTabbedPane tabs = new JTabbedPane();        //stats tab init        JPanel statsTab = new JPanel(new BorderLayout());        name = createSizedJTextField(25);        statsTab.add(pairComponents(StringViewer.createWithFontSelector(name,            this), pairComponents(getLabeledComponent("Name: ", name),            theFlag = new JCheckBox("'The' Flag"), true, false, null,            "If checked 'The' is put before the enemy's name."), false),            BorderLayout.NORTH);        Box statsTabLeft = new Box(BoxLayout.Y_AXIS);        statsTabLeft.add(getLabeledComponent("HP: ",            (hp = createSizedJTextField(5))));        statsTabLeft.add(getLabeledComponent("PP: ",            (pp = createSizedJTextField(5))));        statsTabLeft.add(getLabeledComponent("Exp:          ",            (exp = createSizedJTextField(10))));        statsTabLeft.add(getLabeledComponent("Money: ",            (money = createSizedJTextField(5))));        statsTabLeft.add(getLabeledComponent("Speed: ",            (speed = createSizedJTextField(3))));        statsTabLeft.add(getLabeledComponent("Offense: ",            (offense = createSizedJTextField(3))));        statsTabLeft.add(getLabeledComponent("Defense: ",            (defense = createSizedJTextField(3))));        status = new JComboBox();        status.addItem("Normal");        status.addItem("PSI Shield \u03B1 (Blocks PSI)");        status.addItem("PSI Shield \u03B2 (Reflects PSI)");        status.addItem("Shield Alpha \u03B1 (Blocks physical)");        status.addItem("Shield Alpha \u03B2 (Reflects physical)");        status.addItem("Asleep");        status.addItem("Can't concentrate");        status.addItem("Feeling strange");        statsTabLeft.add(getLabeledComponent("Status: ", status));        statsTabLeft.add(getLabeledComponent("Level: ",            (level = createSizedJTextField(3))));        statsTabLeft.add(getLabeledComponent("Guts: ",            (guts = createSizedJTextField(3))));        statsTabLeft.add(getLabeledComponent("IQ: ",            (iq = createSizedJTextField(3))));        statsTab.add(pairComponents(statsTabLeft, new JLabel(), false),            BorderLayout.WEST);        Box statsTabRight = new Box(BoxLayout.Y_AXIS);        statsTabRight.add(HackModule.getLabeledComponent("Gender: ",            gender = new JComboBox()));        gender.addItem(HackModule.getNumberedString("Male", 1));        gender.addItem(HackModule.getNumberedString("Female", 2));        gender.addItem(HackModule.getNumberedString("Neutral", 3));        gender.setSelectedIndex(0); //TODO ??? (gender combobox)        gender.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent ae)            {                unknowna.setText(Integer                    .toString(gender.getSelectedIndex() + 1));            }        });        statsTabRight.add(Box.createVerticalStrut(40));        statsTabRight.add(pairComponents(runFlag = new JCheckBox(            "Fear higher leveled PCs?"), new JLabel(), true));        runFlag            .setToolTipText("If checked this enemy will run from your party (out of battle).");        statsTabRight.add(Box.createVerticalStrut(10));        statsTabRight.add(item = new ItemEditor.ItemEntry("Item", this, this));        statsTabRight.add(getLabeledComponent("Item Freq: ",            itemFreq = new JComboBox()));        //init itemFreq        for (int i = 0; i < 8; i++)        {            itemFreq.addItem(getNumberedString(Integer.toString((int) Math.pow(                2, i))                + "/128", i));        }        statsTabRight.add(Box.createVerticalStrut(10));        statsTabRight.add(getLabeledComponent("Miss Rate: ",            (missRate = createSizedJTextField(3))));        statsTabRight            .add(getLabeledComponent("Type: ", type = new JComboBox()));        type.addItem(getNumberedString("Normal", 0));        type.addItem(getNumberedString("Insect", 1));        type.addItem(getNumberedString("Metal", 2));        statsTab.add(pairComponents(statsTabRight, new JLabel(), false),            BorderLayout.EAST);        tabs.addTab("Stats", pairComponents(statsTab, new JLabel(), true));        //actions tab init        JPanel actionsTab = new JPanel(new BorderLayout());        JPanel actionsTabTop = new JPanel();        actionsTabTop.setLayout(new BoxLayout(actionsTabTop, BoxLayout.Y_AXIS));        String[] tmp = new String[256];        Arrays.fill(tmp, "");        String afk;        for (int i = 0; i < actions.length; i++)        {            afk = "Action " + (i + 1);            if (i == 4)            {                actionsTabTop.add(Box.createVerticalStrut(10));                afk = "End Action";            }            actions[i] = new ActionEditor.ActionEntry(afk);            actionsTabTop.add(pairComponents(actions[i], getLabeledComponent(            //                        (i < 4 ? "Action " + (i + 1) + ": " : "End Action: "),                //                        actions[i] =                //                            createComboBox(effects)),                //                    getLabeledComponent(                (i < 4 ? "Argument " + (i + 1) + ": " : "End Argument: "),                arguements[i] = createJComboBoxFromArray(tmp)), true, true,                null, null));            actions[i].setSelectedIndex(0);            arguements[i].setSelectedIndex(0);            final int z = i;            ListDataListener argldl = new ListDataListener()            {                public void contentsChanged(ListDataEvent lde)                {                    if (arguements[z].getSelectedIndex() == -1)                        arguements[z].setSelectedIndex(lde.getIndex0());                }                public void intervalAdded(ListDataEvent arg0)                {}                public void intervalRemoved(ListDataEvent arg0)                {}            };            ItemEditor.addItemDataListener(argldl);            //EnemyEditor.addEnemyDataListener(argldl);            actions[i].setActionCommand("enemyActionChanged" + i);            actions[i].addActionListener(this);            for (int j = 0; j < 256; j++)            {                arguements[i].addItem(getNumberedString("", j));            }        }        actionsTab.add(actionsTabTop, BorderLayout.NORTH);        JPanel actionsTabBottom = new JPanel();        actionsTabBottom.setLayout(new BoxLayout(actionsTabBottom,            BoxLayout.Y_AXIS));        actionsTabBottom            .add(getLabeledComponent(                "Order: ",                actionOrder = new JComboBox(),                "Staggered Order goes something like \"Attack 3, 4, 3, 4, 3, 4, 3, 1, 2, 1, 2, etc.\""));        actionOrder.addItem(getNumberedString("Random", 0));        actionOrder.addItem(getNumberedString("Random, Favor Third", 1));        actionOrder.addItem(getNumberedString("In Order", 2));        actionOrder.addItem(getNumberedString("Staggered Order", 3));        actionsTabBottom.add(startPointer = new TextEditor.TextOffsetEntry(            "Start Text", true));        actionsTabBottom.add(deathPointer = new TextEditor.TextOffsetEntry(            "Death Text", true));        actionsTabBottom.add(getLabeledComponent("Max Call: ",            maxCall = createSizedJTextField(3),            "Values over 8 are treated as 8 by EB"));        actionsTab.add(pairComponents(actionsTabBottom, new JLabel(), true),            BorderLayout.SOUTH);        tabs.addTab("Actions", actionsTab);        //gfx/sound tab init        JPanel appearenceTab = new JPanel();        appearenceTab.setLayout(new BoxLayout(appearenceTab, BoxLayout.Y_AXIS));        appearenceTab.add(getLabeledComponent("Outside Pic: ",            outsidePic = createComboBox(sptNames, false, this),            "Appearance out of battle. Subtract one for SPT entry number."));        appearenceTab.add(Box.createVerticalStrut(5));        appearenceTab.add(getLabeledComponent("Movement: ",            movement = createSizedJTextField(5),            "Movement pattern, most values unknown"));        appearenceTab.add(Box.createVerticalStrut(10));        appearenceTab.add(getLabeledComponent("Row: ", row = HackModule            .createJComboBoxFromArray(new String[]{"Front", "Back"}, false)));        appearenceTab.add(Box.createVerticalStrut(10));        appearenceTab.add(getLabeledComponent("Battle Sprite: ",            insidePic = createComboBox(battleSpriteNames, "Invisible"),            "Appearence in battle"));        insidePic.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent e)            {                updateInsidePicPrev();            }        });        insidePic.setEditable(true);        insidePic.addActionListener(new ActionListener()        {            public void actionPerformed(ActionEvent ae)            {                if (ae.getActionCommand().equals("comboBoxEdited"))                    HackModule.search((String) insidePic.getSelectedItem(),                        insidePic);            }        });        appearenceTab.add(getLabeledComponent("Palette: ",            palette = createSizedJTextField(3),            "Colors used for battle sprite (0-31)"));        palette.getDocument().addDocumentListener(new DocumentListener()        {            public void changedUpdate(DocumentEvent e)            {                updateInsidePicPrev();            }            public void insertUpdate(DocumentEvent e)            {                updateInsidePicPrev();            }            public void removeUpdate(DocumentEvent e)            {                updateInsidePicPrev();            }        });        appearenceTab.add(Box.createVerticalStrut(10));        appearenceTab.add(getLabeledComponent("Death Sound: ",            deathSound = new JComboBox()));        deathSound.addItem(getNumberedString("Normal", 0));        deathSound.addItem(getNumberedString("Boss", 1));        appearenceTab.add(getLabeledComponent("Music: ",            music = createJComboBoxFromArray(musicNames)));        tabs.addTab("Graphics / Sound", pairComponents(pairComponents(            appearenceTab, insidePicPrev = new JLabel(), true), new JLabel(),            false));        //weaknesses tab init        Box weaknessTab = new Box(BoxLayout.Y_AXIS);        String[] weaknessNames = new String[]{"PSI Fire", "PSI Freeze",            "PSI Flash", "Paralysis", "Hypnosis/Brainshock"}, weaknessCat = new String[]{            "100% effective", "75% effective", "50% effective",            "25% effective", "1% effective"}, ffWeaknessCat = new String[]{            "200% effective", "150% effective", "100% effective",            "50% effective", "1% effective"};        for (int i = 0; i < weaknessNames.length; i++)        {            weaknessTab.add(getLabeledComponent(weaknessNames[i],                weakness[i] = HackModule.createJComboBoxFromArray(i < 2                    ? ffWeaknessCat                    : weaknessCat)));        }        tabs.addTab("Weaknesses", pairComponents(pairComponents(weaknessTab,            new JLabel(), true), new JLabel(), false));        //unknowns tab init        JPanel unknownsTab = new JPanel();        unknownsTab.setLayout(new BoxLayout(unknownsTab, BoxLayout.Y_AXIS));        unknownsTab.add(getLabeledComponent("Unknown A (gender): ",            unknowna = createSizedJTextField(3),            "Replaced by gender on the first tab."));        unknowna.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown B (PSI Fire): ",            unknownb = createSizedJTextField(3),            "Replaced by PSI Fire in weaknesses tab."));        unknownb.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown C (PSI Freeze): ",            unknownc = createSizedJTextField(3),            "Replaced by PSI Freese in weaknesses tab."));        unknownc.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown D (PSI Flash): ",            unknownd = createSizedJTextField(3),            "Replaced by PSI Flash in weaknesses tab."));        unknownd.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown E (Paralysis): ",            unknowne = createSizedJTextField(3),            "Replaced by Paralysis in weaknesses tab."));        unknowne.setEnabled(false);        unknownsTab.add(getLabeledComponent(            "Unknown F (Hypnosis/Brainshock): ",            unknownf = createSizedJTextField(3),            "Replaced by Hypnosis/Brainshock in weaknesses tab."));        unknownf.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown G (final action): ",            unknowng = createSizedJTextField(3),            "Final action arguement. Edit on the actions tab."));        unknowng.setEnabled(false);        unknownsTab.add(getLabeledComponent("Unknown H: ",            unknownh = createSizedJTextField(3),            "Byte after Unknown G, see: unknown3.txt"));        unknownsTab.add(getLabeledComponent("Unknown I (row): ",            unknowni = createSizedJTextField(3),            "Replaced by row in Graphics/Sound tab."));        unknowni.setEnabled(false);        unknownsTab            .add(getLabeledComponent("Unknown J: ",                unknownj = createSizedJTextField(3),                "Last byte; see: unknown1.txt"));        unknownsTab.add(getLabeledComponent("Unknown K: ",            unknownk = createSizedJTextField(3),            "Byte after offense, offense is confirmed one byte"));        unknownsTab            .add(getLabeledComponent("Unknown L: ",                unknownl = createSizedJTextField(3),                "Byte after defense, defense is confirmed one byte; see unknown4.txt"));        tabs.addTab("Unknowns", pairComponents(pairComponents(new JLabel(            "Unknown*.txt's at http://pkhack.starmen.net/old/misc/"),            pairComponents(unknownsTab, new JLabel(), true), false, true, null,            null), new JLabel(), false));        mainWindow.getContentPane().add(tabs, BorderLayout.CENTER);        selector.setSelectedIndex(0);        mainWindow.pack();    }