Solved

Making a dialog modal to an applet

Posted on 2001-06-05
4
472 Views
Last Modified: 2006-11-17
Hello,

       I have modal dialog which pops up on click of menu item from an applet. When I start my applet from appletviewer it is fine but when start it from my IE I can till go back to the browser, I know that if user kicks on the same menu again i can make sure that old dialog can be popped up by a simple logic.
        But I would like to know if there is any better way of doing this.

bye,
Sobhan
0
Comment
Question by:sobhan_genie
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 20 total points
ID: 6158501
You need to pass the applet frame to the Dialog ctor.
Try using the following to get the applet frame:

public Frame getAppletFrame()
{
  Container container = applet.getParent();
  while (container != null)
  {
    if (container instanceof Frame)
    {
       return (Frame)container;
    }
  }
  return null;
}

0
 
LVL 3

Expert Comment

by:rkenworthy
ID: 6160598
Actually, this is a defect of IE. No applet dialogs are modal in IE, which really blows. The next best thing, is to design a mechanism such that "clickable" components underneath the dialog are deactivated until the user clicks "ok" (or whatever) in the dialog.

Hope it helps,
Rob
0
 
LVL 92

Expert Comment

by:objects
ID: 6161891
Yes but the above will at least force the dialog window to stay in front of the browser and not get lost behind it.

If you have to stop people interacting with your applet, then just 'cover' it with a glass pane setup to consume all events.
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 8898981


No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


--  Points to objects


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 95
micro services vs rest web services 16 103
advertisement module in core php 4 159
Java exception bubble up 2 17
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

776 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