epimorphic
Programmer
I have an applet that contains a JScrollPane (which in turn contains a JTextPane).
A button in the applet launches a JOptionPane that asks for some information from the user, which is then incorporated into the Document for the JTextPane.
The problem I'm having is this: I want the JTextPane to regain the focus after the JOptionPane has done its thing. I cannot seem to make this happen. Instead, once the JOptionPane window is closed, the focus is on the browser window containing the applet., and not the applet itself. (E.g., when I press the up/down arrow keys, they move the browser window rather than the cursor inside the JTextPane, although the cursor is visible and blinking.)
I have tried several variations on grabFocus() and requestFocus(), so far to no avail. Any help would be greatly appreciated.
--
Michael Dickson
epimorphic, incorporated
A button in the applet launches a JOptionPane that asks for some information from the user, which is then incorporated into the Document for the JTextPane.
The problem I'm having is this: I want the JTextPane to regain the focus after the JOptionPane has done its thing. I cannot seem to make this happen. Instead, once the JOptionPane window is closed, the focus is on the browser window containing the applet., and not the applet itself. (E.g., when I press the up/down arrow keys, they move the browser window rather than the cursor inside the JTextPane, although the cursor is visible and blinking.)
I have tried several variations on grabFocus() and requestFocus(), so far to no avail. Any help would be greatly appreciated.
--
Michael Dickson
epimorphic, incorporated