Making a JTextField keep its focus in a web page
Posted on 2001-06-20
We are building messaging-based web application that combines an applet and a couple of JSP pages in browser. When the applet receives certain messages from the server, it creates a URL that is to be directed to the JSP pages in a different frame of the same browser. When the JSP receives the request, it updates the page with the information contained in the URL.
The problem we have seen is that if a user is in a JTextField while the frame containing the JSP is being refreshed, it looses the focus and does not return to the field.
Is there a way for the applet (particularly the JTextField the user is currently entering text) to maintain the focus during the JSP refresh in a separate window?
We are using JDK v1.3.002 with IE 5.x on a Wintel platform if this helps.
Thanks in advance.