Text field causing deadlock?

I’m using a game loop to do the painting, null repaint, etc.
When I try to use an editable text component, the program hangs. I’ve searched around on the forums a bit for this and I believe it must be deadlock, but I’m not sure how to go about verifying this or fixing it. Non-edit input to the text area works fine: arrows, mouse selection of text, etc.
Any ideas?

Thanks in advance!

(Edit: my paint loop runs in its own thread. Don’t know if that matters, but there you go)

Swing relies on everything done in the AWT Event Thread, so this might very well be the problem.

AWT Event Thread strikes again! :stuck_out_tongue:

I wrappered the paint section as a Runnable and passed it to EventQueue.invokeAndWait(…). That did the trick. I keep forgetting that Swing isn’t thread safe. :-\