import java.io.*;
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;
import java.applet.*;
import java.net.*;
public class mainMap extends Applet
{
static BufferedImage grass;
public static void loadImage()
{
try{
URL img = new URL("file://localhost/K:/test.bmp");
grass = ImageIO.read(img);
}
catch(IOException e){System.out.println("Error")}
}
public void paint(Graphics g)
{
int x = 0, y = 0;
g.drawImage(grass,x,y,this);
g.drawString("Loading....",50,50);
loadImage();//);
g.drawString("back to drawing",60,60);
// g.drawLine(50,50,55,55);
//MapMaker map = new MapMaker();
final int grid = 5;
for(int i = 0;i<100;i++)
{
x = 0;
for(int j = 0;j<=100;j++)
{
//System.out.println("draw");
g.drawImage(grass,x,y,this);
//g.drawLine(x,y,x+5,y+5);
x+=grid;
}
y+=grid;
}
//g.drawLine(70,70,75,75);
}
}
So /pr/ as you can see this is a applet and my applet executes up to the loadImage() part then executes that and just randomly breaks and i can't figure out why... Any of you know why ; ;?