java - Error showing images in applet in browser -
i'm new java applets , have little problem. need load , display images in applet loaded in browser.this part of code i'm using display image:
panel first=new jpanel(); url url = null; try { url = new url(new url(path),"dell_laptop.jpg"); } catch (malformedurlexception e1) { e1.printstacktrace(); } image img = getimage(url); imageicon fimg = new imageicon(img); jlabel jlabel1=new jlabel(fimg); first.add(jlabel1);
so when it's working in eclipse, it's working flawless.but when i'm trying load same applet in html page, it's not working.applet loaded,but images aren't shown.path correct, checked it.
Comments
Post a Comment