public void keyPressed(KeyEvent event) {
//		println("You pressed: " + event.getKeyCode() + ", " + event.getKeyChar());
		if (event.getKeyCode() == KeyEvent.VK_ESCAPE) {
			System.exit(0);
		} else if (event.getKeyCode() == KeyEvent.VK_ENTER) {
			path.clear();
			lab.genNewLab(0, 0);
			render();
		} else if (event.getKeyCode() == KeyEvent.VK_P) {
			path.clear();
			Node2[][] network = lab.getNetwork();
			path = FindPath2.findPath(network, 0, 0, width-1, height-1);
			render();
		} else if (event.getKeyCode() == KeyEvent.VK_O) {
			path.clear();
			Node2[][] network = lab.getNetwork();
			path = FindPath2.findPath(network, 0, width-1, height-1, 0);
			render();
		} else if (event.getKeyCode() == KeyEvent.VK_C) {
			path.clear();
			render();
		} else if (event.getKeyCode() == KeyEvent.VK_R) {
			path.clear();
			Node2[][] network = lab.getNetwork();
			Random r = new Random();
			path = FindPath2.findPath(network, r.nextInt(width), r.nextInt(height), r.nextInt(width), r.nextInt(height));
			render();
		} 
	}