Solved

Keep JFrame on top of JApplet

Posted on 2006-07-06
4
473 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__
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

773 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