commit b2bcd14b2537d75fe33bb968cc212db82397ad03
parent 9f9abd0fbe0ef4c4da9cdeb13637e03d7f3cb87b
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date: Mon, 17 Oct 2022 15:33:47 +0200
update balance in GUI
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/view/GUI.java b/src/view/GUI.java
@@ -150,7 +150,7 @@ public class GUI extends javax.swing.JFrame {
private void jButtonDealActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDealActionPerformed
jLabelResult.setText(""); // clear the last result
- jLabelBalance.setText(Double.toString(game.getBalance())); // update the balance
+ jLabelBalance.setText("Balance: " + game.getBalance()); // update the balance
game.startRound();
jLabelDisplayDealerHand.setText(game.displayDealerFirstCard());
jLabelDealerHandValue.setText(game.displayDealerFirstCardValue());
@@ -167,7 +167,7 @@ public class GUI extends javax.swing.JFrame {
printDealerHand();
jLabelResult.setText(game.checkWhoWins());
printDealerHand();
- jLabelBalance.setText(Double.toString(game.getBalance())); // update the balance
+ jLabelBalance.setText("Balance: " + game.getBalance()); // update the balance
}//GEN-LAST:event_jButtonStandActionPerformed
private void jButtonDoubleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDoubleActionPerformed
@@ -177,7 +177,7 @@ public class GUI extends javax.swing.JFrame {
printPlayerHand();
printDealerHand();
jLabelResult.setText(game.checkWhoWins());
- jLabelBalance.setText(Double.toString(game.getBalance())); // update the balance
+ jLabelBalance.setText("Balance: " + game.getBalance()); // update the balance
}//GEN-LAST:event_jButtonDoubleActionPerformed
private void jButtonHitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHitActionPerformed
@@ -185,7 +185,7 @@ public class GUI extends javax.swing.JFrame {
printPlayerHand();
printDealerHand();
jLabelResult.setText(game.checkWhoWins());
- jLabelBalance.setText(Double.toString(game.getBalance())); // update the balance
+ jLabelBalance.setText("Balance: " + game.getBalance()); // update the balance
}//GEN-LAST:event_jButtonHitActionPerformed
private void jButtonExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonExitActionPerformed