Hi All, I've craeted one window in applet using following code JWindow w = new JWindow(); w.getContentPane().setLayout(new FlowLayout()); w.setSize(600,100); w.setLocation(200,200); w.setVisible(true); But when the applet runs at the bottom of the window it shows message in yellow bar 'Warning applet window'. Could anybody please tell me how to rempve this? And how to show a simple window? thanks in advance. Trupti
The warning is due to the security sandbox the applets must deal with. The only way to get rid of it is to make your applet a trusted entity. To do this you'll have to package you classes up in a jar file and then 'sign' it. Now, when the applet is launched, the user will be prompted to download the jar file and whether or not it is to be trusted. If they do so, the warning should be removed. Another option might be to use Sun's Java Plugin, which runs outside of the browser and isn't so restrictive when running applets. One other solution I've seen recently (though I havn't tried it) is to create a small frame (which will have the warning) and then have this frame create another frame overtop of the first one. If I recall correctly, the second one won't have the warning. I hope this helps. Sean
posted 19 years ago
Thank you very much Sean. But I don't know how to package the class up in a jar file and how to 'sign' it? Could you please explain it in detail? Many Thanks Trupti
Trupti, I hope you found the responses helpful. Please be sure to register with a proper name. "Trupti" does not follow the conventions. See here for details: http://www.javaranch.com/name.jsp If you do not register properly, your account will be disabled. I would hate to see that happen. Thank you. Stephanie
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!