private void onSpeedChange(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onSpeedChange
        try {
            game.setSpeed(Integer.parseInt(JOptionPane.showInputDialog(this, "Enter speed (ms):", game.getSpeed())));
            panel.resetFrames();
            game.resetTicks();
        } catch (NumberFormatException ex) {
            // ignore
        }
    }//GEN-LAST:event_onSpeedChange