public void mouseClicked(MouseEvent e){
  java.awt.Point p=e.getPoint();
  centerViewAt(field.getWorldPosition(new Coord(p.x,p.y)));
}

public void mouseClicked ( MouseEvent e ) { java . awt . Point p = e . getPoint ( ) ; centerViewAt ( field . getWorldPosition ( new Coord ( p . x , p . y ) ) ) ; }
if mouse button is clicked , centers view at that location .
