if (i < 0) return;
    private void saveInfo(int i)    {        try        {            TPTEntry e = tptEntries[i];            e.setSprite(sprite.getSelectedIndex());            e.setType(type.getSelectedIndex() + 1);            e.setPointer(pointer.getOffset());            if (e.getType() != TPTEntry.TYPE_ITEM)            {                e.setSecPointer(secPointer.getOffset());            }            else            {                if (moneyCheckBox.isSelected())                {                    e.setMoney(Integer.parseInt(money.getText()));                }                else                {                    e.setItem(item.getSelectedIndex());                }            }            e.setMovement(Integer.parseInt(movement.getText()));            e.setDirection(direction.getSelectedIndex());            try            {                String temp = killSpaces(eventFlag.getText());                temp = temp.substring(2, 4) + temp.substring(0, 2);                e.setEventFlag(Integer.parseInt(temp, 16));            }            catch (StringIndexOutOfBoundsException sie)            {                throw (new NumberFormatException("Flag value too short."));            }            e.setShowSprite(showSprite.getSelectedIndex());            e.writeInfo();        }        catch (NumberFormatException nfe)        {            JOptionPane.showMessageDialog(mainWindow,                "Unable to save TPT entry due to invalid input.\n"                    + "Please make sure that you use only hexidecimal\n"                    + "for the flag field. The digits 0-9 and the \n"                    + "letters a-f are allowed. The flag field should\n"                    + "be two hex digits, a space, and another two\n"                    + "hex digits.", "Invalid input.",                JOptionPane.ERROR_MESSAGE);        }    }