Solved

Keep JFrame on top of JApplet

Posted on 2006-07-06
4
481 Views
Last Modified: 2013-11-23
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?
0
Comment
Question by:colr__
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 25

Expert Comment

by:InteractiveMind
ID: 17052482
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
 
LVL 8

Author Comment

by:colr__
ID: 17129184
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
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 17400013
PAQed with points refunded (125)

GhostMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question