this is my java code that i'm experimenting with right now. trying to learn graphics.
import java.applet.*;
import java.awt.*;
public class game extends Applet
{
Image dbz;
public void init()
{
Font newFont = new Font("TimesRoman", Font.BOLD + Font.ITALIC, 50);
setFont(newFont);
dbz = getImage(getCodeBase(), "dbz.jpeg");
}
public void paint(Graphics g)
{
//Color red = new Color(255,0,0);
//g.setColor(red);
//g.drawString("hello world", 50, 50);
g.drawImage(dbz,0,0,this);
}
}
and i'm just using a regular html file to run it in. when i compile it i get no errors, but the image never shows. on line 12 i can type anything into the quotes and still get no errors, so i think that might be where the problem is.