Better Design Pattern For Terminal-Like GUI
Maybe something like this? Note: may add textField as a member of State0 and State1

public interface State
{
    boolean hasNext();
    State next();
}

public final class State0
    implements State
{
    private boolean okToContinue = false;
    private int number;

    @Override
    public boolean hasNext()
    {
        try {
            textArea.append("Enter a number");
            number = Integer.parseInt(textField.getText());
            okToContinue = true;
        } catch (NumberFormatException ignored) {
            textArea.append("Input is not a number");
        }
        return true;
    }

    @Override
    public State next()
    {
        return okToContinue ? new State1(number) : this;
    }
}


The State1 implementation is then obvious. In the main loop you can just do:

State state = new State0();

while (state.hasNext())
    state = state.next();