commit d995000bb1958d6723ef0ed9ec755c39ed532018
parent 8890da1c308ff3e61b54c8a5ab95c4c2d2368cd6
Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com>
Date: Sun, 16 Oct 2022 21:20:38 +0200
update GUI
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/view/GUI.form b/src/view/GUI.form
@@ -114,10 +114,10 @@
</Constraint>
</Constraints>
</Component>
- <Component class="javax.swing.JLabel" name="jLabel1">
+ <Component class="javax.swing.JLabel" name="jLabelCurrentBet">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
- <Connection code=""Current bet: " + game.getBet()" type="code"/>
+ <Connection code=""Current Bet: " + game.getBet()" type="code"/>
</Property>
</Properties>
<Constraints>
diff --git a/src/view/GUI.java b/src/view/GUI.java
@@ -34,7 +34,7 @@ public class GUI extends javax.swing.JFrame {
jButtonHit = new javax.swing.JButton();
jButtonDeal = new javax.swing.JButton();
jButtonBetAmount = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
+ jLabelCurrentBet = new javax.swing.JLabel();
jLabelResult = new javax.swing.JLabel();
jLabelDiaplayDealerHand = new javax.swing.JLabel();
jLabelDisplayPlayerHand = new javax.swing.JLabel();
@@ -86,8 +86,8 @@ public class GUI extends javax.swing.JFrame {
});
getContentPane().add(jButtonBetAmount, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 580, 220, 60));
- jLabel1.setText("Current bet: " + game.getBet());
- getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 520, 200, 50));
+ jLabelCurrentBet.setText("Current Bet: " + game.getBet());
+ getContentPane().add(jLabelCurrentBet, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 520, 200, 50));
jLabelResult.setText(game.checkWhoWins());
getContentPane().add(jLabelResult, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 30, 460, 110));
@@ -113,6 +113,7 @@ public class GUI extends javax.swing.JFrame {
private void jButtonBetAmountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBetAmountActionPerformed
game.setBet(Double.parseDouble(JOptionPane.showInputDialog("Enter the bet amount")));
+ jLabelCurrentBet.setText("Current Bet: " + Double.toString(game.getBet()));
}//GEN-LAST:event_jButtonBetAmountActionPerformed
/**
@@ -156,8 +157,8 @@ public class GUI extends javax.swing.JFrame {
private javax.swing.JButton jButtonDouble;
private javax.swing.JButton jButtonHit;
private javax.swing.JButton jButtonStand;
- private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabelBalance;
+ private javax.swing.JLabel jLabelCurrentBet;
private javax.swing.JLabel jLabelDealerHand;
private javax.swing.JLabel jLabelDiaplayDealerHand;
private javax.swing.JLabel jLabelDisplayPlayerHand;