Pressing 'q' or ESC now quits the programm.
This commit is contained in:
parent
0b6afebb08
commit
2bb13b0685
1 changed files with 4 additions and 0 deletions
|
|
@ -37,6 +37,10 @@ public class Canvas {
|
||||||
drawBuffer.getHeight());
|
drawBuffer.getHeight());
|
||||||
g.dispose();
|
g.dispose();
|
||||||
}
|
}
|
||||||
|
if (e.getKeyChar() == 'q'
|
||||||
|
|| e.getKeyCode() == KeyEvent.VK_ESCAPE) {
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue