}
@Override
- public void keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
+ public boolean keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
if ('r' == event.getKeyChar()) {
raytrace();
- return;
+ return true;
}
- super.keyPressed(event, viewPanel);
+ return super.keyPressed(event, viewPanel);
}
private void putPixel(final int x, final int y, final int z,
* Handle keyboard input.
*/
@Override
- public void keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
+ public boolean keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
switch (event.getKeyChar()) {
case ' ': // space key
MATRIX.evolve(false);
MATRIX.clear();
break;
default:
- super.keyPressed(event, viewPanel);
+ return super.keyPressed(event, viewPanel);
}
+ return true;
}
private void run() {