Solved

Keep JFrame on top of JApplet

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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

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
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

688 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