Click here to Skip to main content
15,901,853 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
import java.applet.*;
import java.awt.*;

public class Draw extends java.applet.Applet
{
Image mg;

public void init()
{
mg = getImage(getdocumentBase(), "java.gif");

}

public void paint(Graphics g)
{
g.drawImage(mg,5,45,this);

}
}

What I have tried:

tried changing the path to absolute path still doesnt loads
Posted
Comments
Richard MacCutchan 16-Nov-17 11:20am    
Are you sure that getImage will combine those two elements to create a single path?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900