Waiting for text field input, blocking event thread
Hi it's me again :)I have a panel/frame with various swing object, and one of them is a simple JTextField in which you're supposed to write text. I have one class that extends ActionListener and intercepts the inputfield's events. However, I would like to somehow block the main event thread until the user has written some text and pressed enter in the textfield.
I was looking through the SwingWorker examples but I can't get it to work. Creating a thread and calling SwingUtilities.invokeAndWait(xxx) is what I want, but I can't call that method from within the main event thread. Help :)
