Pressing 'q' or ESC now quits the programm.

This commit is contained in:
Marcel Hellkamp 2014-05-07 16:34:49 +02:00
parent 0b6afebb08
commit 2bb13b0685

View file

@ -37,6 +37,10 @@ public class Canvas {
drawBuffer.getHeight());
g.dispose();
}
if (e.getKeyChar() == 'q'
|| e.getKeyCode() == KeyEvent.VK_ESCAPE) {
System.exit(0);
}
}
@Override