Курсовая работа: Java-гра Тетріс
case KeyEvent.VK_UP:
p.figureRotate();
break;
case KeyEvent.VK_DOWN:
p.figureMoveDown();
break;
case KeyEvent.VK_F2:
p.startNewGame();
break;
case KeyEvent.VK_F3:
p.gamePauseResume();
break;
default: return;
}
repaint();
}//GEN-LAST:event_tetrisGamePanel1KeyPressed
private void menuNewGame1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuNewGame1ActionPerformed
TetrisGamePanel p = (TetrisGamePanel)tetrisGamePanel1;
p.startNewGame();
}//GEN-LAST:event_menuNewGame1ActionPerformed
private void menuPauseGame1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuPauseGame1ActionPerformed
TetrisGamePanel p = (TetrisGamePanel)tetrisGamePanel1;
p.stopGame();
}//GEN-LAST:event_menuPauseGame1ActionPerformed
private void menuFileExit1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuFileExit1ActionPerformed
System.exit(0);
}//GEN-LAST:event_menuFileExit1ActionPerformed
/**
* @param args the command line arguments