Here's the basic idea:
There is a java window (main) that opens another java window (child). When the child is created, part of the initialization sets the focus in the appropriate text field in the child window:
childTextField.requestFocusInWindow();
childTextField.setCaretPosition(0);
The child is generally opened through a serious of keystrokes via a command line type interface. When the window is requested, 90%ish of the time, the focus correctly goes to the child window text field and the user can type in the box. If the command to open the child is sent off (with a press of the enter key) and the user immediately starts typing before the new window is created, the text is correctly buffered and appears in the new textfield after the window opens.
However, every once in a while when the user requests the child window to open and then starts typing, their text does NOT appear in the text field. Only after they click with the mouse in the field does the text they have typed appear. It's like it's being stored somewhere and doesn't come out until they click.
The real frustrating thing here is that I can't seem to reliably reproduce the issue at all. It definitely happens, but not regularly enough to debug nicely.
There is of course all kinds of other mojo going on behind the scenes, including communication with a server app, but I'm not convinced it's related.
Any thoughts or ideas would be very much appreciated.