Re: Why won't my action listener wait for user input?
Ok, well disregard all typing in the JTextArea. No matter what is in your JTextArea, your program will never read it so its just a display. Just like your terminal.
So when your terminal program requires you to log in to use certain commands, it will display "Username:" Your next input in the JTextField will be where the user enters this information.
Now that is defined, your submit JButton action listener is going to need to call a different method. A method that can handle the information that is incoming and understand the information plugged in. If your command is "login", when you press submit then your action listener called interpretInformation(String JTextField.getText()); From there, interpretInformation(String tempStringThatWeNeedToKeep){//stuff} needs to compare the entered string to see if it a known command. I recommend an array of strings, and if tempStringThatWeNeedToKeep != commandArray[i] all the way to the end then it needs to kick back saying "Yo brah, this is not right. L2EnterInfo." If it does find one, say login is the command, then it needs to call the login() method. How you go about determining how each command string that is found knows how to call the proper method is up to you. There may be an easier way to do it, but I can't think of it right now.
No where in your code should any of the GUI objects directly call methods other than interpretInformation(). Don't forget to check to make sure that JTextField.getText() isn't null.
The tricky part is to find a way to make that one JTextField able to take commands and arguments, I would probably use a program state to determine how the information knows where it's supposed to go properly. This gets more complex as you add more and more dynamic commands in. I don't know how involved your program is going to become, but your syntax on how information is entered in the JTextField is a huge factor in separating command data. I'll leave you to figure out how you want to handle this complex issue in your own way.
That's how I would do it, and it makes things a bit more complicated by doing it in gui but after thinking about what you want I don't think it's as difficult as your first idea.
I hope this helped clear anything up or pointed you in the right direction. Sometimes I start typing and get sidetracked from my original thought, so hopefully that didn't happen here.