Results 1 to 5 of 5
- 09-24-2009, 05:48 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 3
- Rep Power
- 0
Problem deploying applet to browser
Hi all, i am with a problem when deploying an applet to a web browser.
i am using netbeans 6.7.1, JDK 6 Update 16 with Java EE and IE 8 [or firefox 3.5.3].
I've created a JApplet Form and then in the self generated .html file with <applet> tags, i can deploy the applet to the IE8.
T
he thing is i need to put a picture in the applet. waht i did was to create a label, remove it's text and seted a icon with the image. I can run the applet fine and everything is ok. When i go to the .html file and deploy it to the browser, i get a gray image with the size of the applet but completly...dead, only gray, no controls, no image, no nothing.
It this a known bug or what?
Thank you for your help guys!
-
Where is the image file in relation to your class files? Is it held within the Jar file? Are you getting the image as a resource and not as a file?
- 09-24-2009, 06:21 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 3
- Rep Power
- 0
i've created a folder "Images" in the root of the project. then i simply added a label to the applet form and made something like:
jLabel10.setIcon(new javax.swing.ImageIcon("C:\\Documents and Settings\\user\\My Documents\\NetBeansProjects\\App\\Images\\image.pn g"));
So i really dont know how to answer you, what do you mean by" held within the Jar" and "getting the image as a resource and not as a file" ?
I'm getting this image as an external image, searching it from a url in my computer file system
- 09-24-2009, 06:28 PM #4
Senior Member
- Join Date
- Aug 2008
- Posts
- 384
- Rep Power
- 5
Probably a security exception. Have a look at the console, what it prints (It should be one of those icons in the lower right corner)
To fix it, you have to give permission to the applet, adding some kind of security file. Google a bit on how to do that, I'm not familiar with that. :)
(If you can't find the console, try running it in the applet viewer. If it works in there, it's a security exception)I die a little on the inside...
Every time I get shot.
- 09-25-2009, 10:03 AM #5
Member
- Join Date
- Sep 2009
- Posts
- 3
- Rep Power
- 0
Actually, the browser blocks the content but after i give permission to display it, i only get a grey area, and not any error, what makes me think that the browser is supporting and loading the applet but something is wrong. The browser console shows no errors or warnings for this application..
Last edited by nfteodoro; 09-25-2009 at 10:05 AM.
Similar Threads
-
Applet Slideshow in web browser
By Urgle in forum New To JavaReplies: 0Last Post: 12-01-2008, 04:30 AM -
Problem with applet, between appletviewer and browser
By Goodwine in forum Java AppletsReplies: 0Last Post: 11-30-2008, 03:09 AM -
applet won't run in browser...
By shwein in forum Java AppletsReplies: 6Last Post: 10-17-2008, 06:24 PM -
Problem deploying: com/sun/corba/se/internal/io/ValueHandlerIm
By prufrock in forum Advanced JavaReplies: 2Last Post: 09-23-2008, 01:00 PM -
Having problem hot-deploying JSP's
By kurt_cobain in forum EclipseReplies: 0Last Post: 04-03-2008, 05:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks