// if the current player has folded, then advance to the next player.
if (currentPlayer.hasFolded()) {
pc.advanceToNextPlayer();
}
BettingDialog bettingDialog = new BettingDialog(pc, getParent());
boolean canceled = bettingDialog.showDialog();
if ( !canceled ) {
PokerAction action = (PokerAction)currentPlayer.getAction(pc);
applyPokerAction(action, currentPlayer);
pc.advanceToNextPlayer();