Solved

Full application modal JDialog in JApplet.

Posted on 1998-09-21
3
482 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

707 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

16 Experts available now in Live!

Get 1:1 Help Now