I need help with whats wrong with this code. I pretty much quit java a long time ago because i could never get tile based maps. Today i was reading up on programming microncontrollers in c and came up with this after not coding in java for a long time and c is pretty similar to java. The array isnt quite a map but i can implement it once i get threw this part. The array used to be an array of letters but changed it to ints just to see if that was the problem. It compiles fine for me it just doesn't run.


Code:
// what it should do or similar
//
//56 <<-- i know exciting but its all i need then i could do better i 
//78         just need a push

import java.awt.*;
import java.applet.*;

public class maptest extends Applet
{
	int e;
	int f;
	int x;
	int y;
	int z;
	
	int aMap[][] = new int[2][2]; //make the array


	public void init()
	{
	aMap[1][1]=5;
	aMap[1][2]=6;  //fill it with stuff
	aMap[2][1]=7;
	aMap[2][2]=8;
	}

	
	
	public void paint(Graphics g)
	{
	x=1;  
	y=10;  
	z=10;

	
		while(x<=4) //counts to 4 then  ends
		{
			while(e<=2) //counts to 2 then ends and 
			{
			g.drawString(" "+aMap[e][f],y,z); //writes the ints
                        e=e+1;
			y=y+10;
			}
			while(f<=2) same ordeal
			{
			g.drawString(" " +aMap[e][f],y,z);
                        f=f+1;
			z=z+10;
			}
		}
	}
}