File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Regain focus after JOptionPane. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Regain focus after JOptionPane." Watch "Regain focus after JOptionPane." New topic

Regain focus after JOptionPane.

vladislav peichev

Joined: Apr 28, 2011
Posts: 22
I have an applet that displays a JOptionPane warning message using JOptionPane.showMessageDialog. After displaying the message and clicking OK my applet does not get the focus again. Is there a way to get it? Tried suggested workaround

tried also requestFocusInWindow but none did help. Thanks in advance.
vladislav peichev

Joined: Apr 28, 2011
Posts: 22
See my question above.
Darryl Burke

Joined: May 03, 2008
Posts: 5115

Please EaseUp and UseOneThreadPerQuestion. Your other thread has been locked.

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem. Also indicate exactly how you are testing the Applet: browser, version, JRE version.

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: Regain focus after JOptionPane.
It's not a secret anymore!