Keep JFrame on top of JApplet

I have a JFrame opened up from a JApplet. How can I set that JFrame to always be on top of the applet? Do I have to use an Internal frame?
LVL 8
colr__Asked:
Who is Participating?
 
GhostModConnect With a Mentor Commented:
PAQed with points refunded (125)

GhostMod
Community Support Moderator
0
 
InteractiveMindCommented:
Do you mean in front of the applet, or in front *and* bounded by the applet?

If you wish for it to be bounded, then you will probably need to use an internal frame, yes.

Otherwise, I don't think that you can create a modal JFrame with an 'owner' applet..
0
 
colr__Author Commented:
In case anybody is interested, I solved this problem by registering a focus listener. When the frame loses focus, the event triggers a moveToFront() method which keeps it at the front. This is a hack I found from another EE post (lost the link, sorry).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.