protected static void editState(State s)
    {
        MooreMachine m = (MooreMachine) (s.getAutomaton());

        String output = (String) JOptionPane.showInputDialog(null, // I don't seem to need a parent component
            "Enter output:", "Set Output", JOptionPane.QUESTION_MESSAGE, null, null, m.getOutput(s));
          
        /*
         * null checking happens in setOutput too, but this is just to be safe
         */
        if(output == null)
            m.setOutput(s, "");
        else
            m.setOutput(s, output);
        /*
         * This is a cheap hack. It will not immediately display 
         * the output otherwise, and I don't really want to mess 
         * around with the guts of this program.
         */
        s.setLabel(s.getLabel());
    }