private Event createNewEvent()
    {
        Integer commandIntegerArray[] = this.eventFormat.getCommandTypes();
        String commandNameArray[] = new String[commandIntegerArray.length];
        for (int commandIndex = 0; commandIndex < commandIntegerArray.length; commandIndex++)
        {
            if (null == commandIntegerArray[commandIndex])
            {
                commandNameArray[commandIndex] = "unused/unknown";
            }
            else
            {
                commandNameArray[commandIndex] = this.eventFormat.getCommandTypeName(commandIntegerArray[commandIndex].intValue());
            }
        }
        
        String s = (String)JOptionPane.showInputDialog(
                            null,
                            "Choose an event command type:\n",
                            "Event Command Wizard",
                            JOptionPane.PLAIN_MESSAGE,
                            null,
                            commandNameArray,
                            commandNameArray[0]);

        if ((s == null) || (s.length() == 0))
        {
            // no command type chosen
            return null;
        }

        int commandValue = -1;
        for (int commandIndex = 0; commandIndex < commandNameArray.length; commandIndex++)
        {
            String value = commandNameArray[commandIndex];
            if (s.equals(value))
            {
                commandValue = commandIntegerArray[commandIndex].intValue();
                break;
            }
        }

        if (-1 == commandValue)
        {
            // no command found
            return null;
        }

        int eventNumber = 0;
        int eventSequence = 0;
        
        Event newEvent = this.eventFormat.createEventInstance();
        this.eventFormat.initializeWithValues(newEvent, eventNumber, eventSequence, commandValue);
        
        return newEvent;
    }