First Java Game

Hello everyone, this is my first post…
Im making my first java game and just wanted to show what I have so far, also because I have a small problem.

https://dl-web.dropbox.com/get/Java%20Games/screen.png?_subject_uid=59300463&w=AACRtlbmQ4eDxwDEeA7NLCNcrPI1f8qr4K2vPgTy0g2mOg

When I switch directions really fast there is a small delay between the switch in his frame.
Here is the link along with code snippets



	public void render(Graphics g){
		///animation frame
		animTimer++;
		switch(facing){
		case 1:
		 frameMin=1;
		 frameMax=2;
		break;
		case 2:
		 frameMin=3;
		 frameMax=4;
		break;
		case 3:
		 frameMin=5;
		 frameMax=6;
		break;
		case 4:
		 frameMin=7;
		 frameMax=8;
		break;
		}
		player=s.grabImage(animFrameR,1,16,16);
        if(animTimer>=800){
        	if(animSwitch==1)
        	{
        	animFrameR=frameMin;	
        	animSwitch=55;
        	}else if(animSwitch==55){
        	animFrameR=frameMax;
        	animSwitch=1;
        	}
        	animTimer=0;
        }
        g.drawImage(player,(int)x,(int)y,32,32,null);
		
	}

    
	public void update(){
		if(up){
		   y-=speed;
		}
		if(down){
			y+=speed;
		}
		if(left){
			x-=speed;
		}
		if(right){
			x+=speed;
		}
	}



  public void keyPressed(KeyEvent e){
		  //test for e
		  int key=e.getKeyCode();  
		  if(key==KeyEvent.VK_RIGHT){
			 p.right=true;
			 p.facing=3;
		  } if(key==KeyEvent.VK_LEFT){
			  p.left=true;
			  p.facing=4;
		  } if(key==KeyEvent.VK_UP){
			  p.up=true;
			  p.facing=2;
		  } if(key==KeyEvent.VK_DOWN){
			  p.down=true;
			  p.facing=1;
		  }
	  }
	  
	  public void keyReleased(KeyEvent e){
         int key=e.getKeyCode();
		  if(key==KeyEvent.VK_RIGHT){
			 p.right=false; 
		  }else if(key==KeyEvent.VK_LEFT){
			  p.left=false; 
		  }else if(key==KeyEvent.VK_UP){
			  p.up=false;
		  }else if(key==KeyEvent.VK_DOWN){
			  p.down=false;
		  }
	  }






Oops, medal by accident…

thanks?

Please don’t use dropbox as a file-host. It’s a sure way to make nobody but you see the image. Use an image-hosting service like imgur.

Yeah because i cant see the image :-\