This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
When i make a JDialog modal, it only gets modal with respect to my JApplet only, but i want to make it modal with respect to browser.
like the usual modal dialogs which can be made using javascript.
Is there any way to make a JDialog modal with respect to browser.
I've checked a bit, and Internet Explorer 9 and Google Chrome only make dialogs modal for the current tab. Other tabs will not be blocked by a modal dialog. I think the reason is that, at least with Google Chrome, each tab has its own process. I think IE9 uses the same technique. You can't work around that. Firefox only has one process and therefore will have the dialog modal for the entire browser (tested with Firefox 8).
You will need to get a reference to the applet's parent window. Unlike with desktop applications, you don't create it. Instead, the browser or Java plugin creates one for you. You can get a reference to it like this:
All my tests have shown that this Window is always a Frame sub class, so you can use that too:
Thanks for the reply Rob, but doing the things as you said did not work for me.
Here is my code:
and i am running the applet in browser by SampleApplet.html file, here is its code:
I place the html file and jar in same folder and run it.
What happening is even at the Firefox 8.0, the dialog is modal only with respect to my applet , not with respect to the tab and not also with browser.
tahelu kumar
Greenhorn
Joined: Nov 09, 2011
Posts: 16
posted
0
i want to make this dialog modal for the current tab and for the whole browser(if possible).
tahelu kumar
Greenhorn
Joined: Nov 09, 2011
Posts: 16
posted
0
Hi, can anyone help me here please?
tahelu kumar
Greenhorn
Joined: Nov 09, 2011
Posts: 16
posted
0
Hi, can anyone help me here please?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
1
you want to control how I use my browser?
that's an awful idea, and, by the lack of responses, I'd say I'm not alone in my opinion.