Have a look at the ImageObserver in the API documentation, implement the interface and repaint() the applet as soon as the image is fully loaded.
You can also just cut'n'paste the following code and then implement ImageObserver and pass "this" as the ImageObserver parameter when you construct the image:
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
{
if ((infoflags | ImageObserver.ALLBITS) == ImageObserver.ALLBITS)
{
myFrame.setVisible(false);
}
return super.imageUpdate(img, infoflags, x, y, width, height);
}
Hope this helps
allow thyself to be the spark that lights the fire
haslo@haslo.ch - www.haslo.ch
try addind the method updateUI() at the end of your JPanel's constructor. Like:-
public class testPanel extends JPanel
{
public testPanel()
{
...
updateUI();
}
} If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
If you still don't see the image by above given sol.ns , then may be you should add the permission for Image in policytool.There is such a permission...which is required to be added in policy file sometimes
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.