Solved

Full application modal JDialog in JApplet.

Posted on 1998-09-21
3
511 Views
Last Modified: 2012-05-04
In the JApplet I have a menubar with different menu options.
I need to display different full application modal JDialogs ( user can not interact with any other windows in application, but can interact with any windows of other applications on display) based on menu option. I have tried different solutions which works fine in AppletViewer and doesn't work in a browser. If anyone have a solution to this problem please send mail to kshaik@hotmail.com.

Thanks in advance.
0
Comment
Question by:kshaik
3 Comments
 
LVL 5

Expert Comment

by:msmolyak
ID: 1224726
What exactly works in AppletViewer but does not work in a browser? What particular problems are you experiencing?
0
 

Author Comment

by:kshaik
ID: 1224727
my JApplet have two menu options 1. show JTree 2. show JDialog (this should be full application modal dialog). when I selected show JTree option it creates an JInternal frame and adds a JTree to its contentpane and shows the JTree; then I have selected show JDialog ( I have created this as a modal JDialog) it brings up JDialog, at this point I should not able to select anything in the JTree ( or any other window in the applet), unless the JDialog is disposed.. This works fine in AppletViewer and when I executed the same applet in browser I can able to do selections in the tree ( or any other window).
0
 
LVL 1

Accepted Solution

by:
Twix earned 100 total points
ID: 1224728
Hello kshaik,

Modality is a stick issue in browsers. Dialogs can be modal only to a Frame. Technically this means, for applets they will be able to be modal only to the applet. If you have an object that you want to be modal do a specific parent frame, just pass in modalDialog(myFrame1.getParent); People would be able to use other applets on the page while this dialog is up. Some people try a getParent to get the parent frame of the Applet to make it modal to the browser itself, however this is not garenteed to work on any given browser.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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…

808 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