Solved

Keep JFrame on top of JApplet

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now