Solved

ModalDialog and applets

Posted on 1998-07-08
1
185 Views
Last Modified: 2010-03-30
I need to have a modal dialog popup on top of the aplet that is running in a browser.  When the user makes an error, I need to tell them about it, but the only ModalDialog I can find requires a Frame object to be passed in to the constructor.  The othere option was to use my own dialog, but it would get lost behind the browser because I could not make it Modal.
How do I get a modal dialog to popo up on top of an applet.
Thanks,
Georg
0
Comment
Question by:georita
1 Comment
 
LVL 5

Accepted Solution

by:
msmolyak earned 50 total points
ID: 1225397
Two ways to do it.  If you search up the hierarchy starting with your applet, you will find a frame:

Container cont = getParent();
while (!(cont == null))
{
  if (cont instanceof Frame)
  {
    break;
  }
  cont = cont.getParent();
}

Or you can fake it: create a new Frame and pass it to the dialog's constructor:

super (new Frame(), "My Dialog, true);
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

Title # Comments Views Activity
firstswap challenge 20 68
looking for unix program to search some keywords in side EAR WAR and JAR files 10 82
arguments to jar 5 17
tomcat administrtor 12 34
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

864 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

24 Experts available now in Live!

Get 1:1 Help Now