commit 056a2a36453c31b8c3190ace9bfc8b84c549c670
parent 4c05d8d843f79d024766cafdf2034e51918a43ff
Author: Michael Neuper <michael@michaelneuper.com>
Date: Sun, 30 Apr 2023 19:50:41 +0200
Add buttons and color
Diffstat:
| M | src/view/MainUI.form | | | 235 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ |
| M | src/view/MainUI.java | | | 165 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- |
2 files changed, 366 insertions(+), 34 deletions(-)
diff --git a/src/view/MainUI.form b/src/view/MainUI.form
@@ -5,7 +5,7 @@
<Property name="defaultCloseOperation" type="int" value="3"/>
<Property name="title" type="java.lang.String" value="librejack"/>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[900, 600]"/>
+ <Dimension value="[800, 600]"/>
</Property>
</Properties>
<SyntheticProperties>
@@ -22,7 +22,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
- <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,86,0,0,3,-125"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-69,0,0,3,-125"/>
</AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
@@ -43,18 +43,18 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
- <EmptySpace pref="373" max="32767" attributes="0"/>
+ <EmptySpace pref="349" max="32767" attributes="0"/>
<Component id="jLabelResult" min="-2" pref="213" max="-2" attributes="0"/>
- <EmptySpace min="-2" pref="313" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="337" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="1" attributes="0">
- <EmptySpace pref="27" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="25" max="-2" attributes="0"/>
<Component id="jLabelResult" min="-2" pref="50" max="-2" attributes="0"/>
- <EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
+ <EmptySpace pref="25" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -63,9 +63,9 @@
<Component class="javax.swing.JLabel" name="jLabelResult">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
- <Font name="Segoe UI" size="36" style="0"/>
+ <Font name="Segoe UI" size="48" style="0"/>
</Property>
- <Property name="text" type="java.lang.String" value="WON!"/>
+ <Property name="text" type="java.lang.String" value="PUSHED!"/>
</Properties>
</Component>
</SubComponents>
@@ -112,9 +112,9 @@
<Component id="jButtonDoubleDown" min="-2" pref="85" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jButtonSurrender" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
- <Component id="jButtonDeal" pref="102" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+ <Component id="jButtonDeal" pref="203" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -123,7 +123,7 @@
<Component class="javax.swing.JButton" name="jButtonHit">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
- <Color blue="0" green="ff" red="0" type="rgb"/>
+ <Color blue="33" green="cc" red="0" type="rgb"/>
</Property>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Segoe UI" size="24" style="0"/>
@@ -159,7 +159,7 @@
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Segoe UI" size="24" style="0"/>
</Property>
- <Property name="text" type="java.lang.String" value="<html>DOUBLE<br><center>DOWN</center></html>"/>
+ <Property name="text" type="java.lang.String" value="<html>
DOUBLE
<br>
<center>DOWN</center>
</html>"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonDoubleDownActionPerformed"/>
@@ -200,6 +200,9 @@
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="33" green="66" red="0" type="rgb"/>
</Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="33" green="cc" red="0" type="rgb"/>
+ </Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[150, 498]"/>
</Property>
@@ -213,15 +216,80 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="150" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jButtonChangeBet" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabelCurrentBetAmount" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabelCurrentBet" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabelBalance" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace pref="25" max="32767" attributes="0"/>
+ </Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="498" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="114" max="-2" attributes="0"/>
+ <Component id="jLabelBalance" min="-2" pref="38" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
+ <Component id="jLabelCurrentBet" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabelCurrentBetAmount" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
+ <Component id="jButtonChangeBet" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="270" max="32767" attributes="0"/>
+ </Group>
</Group>
</DimensionLayout>
</Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabelBalance">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="0" green="66" red="66" type="rgb"/>
+ </Property>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="24" style="0"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="0" green="ff" red="ff" type="rgb"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="R 1000"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabelCurrentBet">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="18" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Current Bet:"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabelCurrentBetAmount">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="18" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="R 100"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JButton" name="jButtonChangeBet">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="cc" green="cc" red="0" type="rgb"/>
+ </Property>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="18" style="0"/>
+ </Property>
+ <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="66" green="66" red="66" type="rgb"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="<html>
CHANGE
<br>
<center>BET</center>
</html>"/>
+ </Properties>
+ </Component>
+ </SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanelCenter">
<Properties>
@@ -241,15 +309,148 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="549" max="32767" attributes="0"/>
+ <Component id="jPanelDealer" max="32767" attributes="0"/>
+ <Component id="jPanelPlayer" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="498" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jPanelDealer" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ <Component id="jPanelPlayer" min="-2" max="-2" attributes="0"/>
+ </Group>
</Group>
</DimensionLayout>
</Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanelDealer">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="33" green="66" red="0" type="rgb"/>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jPanelDealerText" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jPanelDealerText" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="181" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanelDealerText">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="33" green="66" red="0" type="rgb"/>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabelDealer1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="411" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabelDealer1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="52" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabelDealer1">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="30" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Dealer: 13"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="jPanelPlayer">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="33" green="66" red="0" type="rgb"/>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jPanelPlayerText" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jPanelPlayerText" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="242" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanelPlayerText">
+ <Properties>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="33" green="66" red="0" type="rgb"/>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabelDealer" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabelDealer" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="43" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabelDealer">
+ <Properties>
+ <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+ <Font name="Segoe UI" size="30" style="0"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Player: 13"/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
</Container>
</SubComponents>
</Form>
diff --git a/src/view/MainUI.java b/src/view/MainUI.java
@@ -40,32 +40,42 @@ public class MainUI extends javax.swing.JFrame {
jButtonSurrender = new javax.swing.JButton();
jButtonDeal = new javax.swing.JButton();
jPanelWest = new javax.swing.JPanel();
+ jLabelBalance = new javax.swing.JLabel();
+ jLabelCurrentBet = new javax.swing.JLabel();
+ jLabelCurrentBetAmount = new javax.swing.JLabel();
+ jButtonChangeBet = new javax.swing.JButton();
jPanelCenter = new javax.swing.JPanel();
+ jPanelDealer = new javax.swing.JPanel();
+ jPanelDealerText = new javax.swing.JPanel();
+ jLabelDealer1 = new javax.swing.JLabel();
+ jPanelPlayer = new javax.swing.JPanel();
+ jPanelPlayerText = new javax.swing.JPanel();
+ jLabelDealer = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("librejack");
- setPreferredSize(new java.awt.Dimension(900, 600));
+ setPreferredSize(new java.awt.Dimension(800, 600));
jPanelNorth.setBackground(new java.awt.Color(0, 102, 51));
- jLabelResult.setFont(new java.awt.Font("Segoe UI", 0, 36)); // NOI18N
- jLabelResult.setText("WON!");
+ jLabelResult.setFont(new java.awt.Font("Segoe UI", 0, 48)); // NOI18N
+ jLabelResult.setText("PUSHED!");
javax.swing.GroupLayout jPanelNorthLayout = new javax.swing.GroupLayout(jPanelNorth);
jPanelNorth.setLayout(jPanelNorthLayout);
jPanelNorthLayout.setHorizontalGroup(
jPanelNorthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelNorthLayout.createSequentialGroup()
- .addContainerGap(373, Short.MAX_VALUE)
+ .addContainerGap(349, Short.MAX_VALUE)
.addComponent(jLabelResult, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(313, 313, 313))
+ .addGap(337, 337, 337))
);
jPanelNorthLayout.setVerticalGroup(
jPanelNorthLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelNorthLayout.createSequentialGroup()
- .addContainerGap(27, Short.MAX_VALUE)
+ .addGroup(jPanelNorthLayout.createSequentialGroup()
+ .addGap(25, 25, 25)
.addComponent(jLabelResult, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(23, 23, 23))
+ .addContainerGap(25, Short.MAX_VALUE))
);
getContentPane().add(jPanelNorth, java.awt.BorderLayout.NORTH);
@@ -73,7 +83,7 @@ public class MainUI extends javax.swing.JFrame {
jPanelEast.setBackground(new java.awt.Color(0, 102, 51));
jPanelEast.setPreferredSize(new java.awt.Dimension(200, 498));
- jButtonHit.setBackground(new java.awt.Color(0, 255, 0));
+ jButtonHit.setBackground(new java.awt.Color(0, 204, 51));
jButtonHit.setFont(new java.awt.Font("Segoe UI", 0, 24)); // NOI18N
jButtonHit.setForeground(new java.awt.Color(102, 102, 102));
jButtonHit.setText("HIT");
@@ -90,7 +100,7 @@ public class MainUI extends javax.swing.JFrame {
jButtonDoubleDown.setBackground(new java.awt.Color(102, 0, 255));
jButtonDoubleDown.setFont(new java.awt.Font("Segoe UI", 0, 24)); // NOI18N
- jButtonDoubleDown.setText("<html>DOUBLE<br><center>DOWN</center></html>");
+ jButtonDoubleDown.setText("<html>\nDOUBLE\n<br>\n<center>DOWN</center>\n</html>");
jButtonDoubleDown.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonDoubleDownActionPerformed(evt);
@@ -140,25 +150,58 @@ public class MainUI extends javax.swing.JFrame {
.addComponent(jButtonDoubleDown, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButtonSurrender)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jButtonDeal, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)
- .addGap(18, 18, 18))
+ .addGap(18, 18, 18)
+ .addComponent(jButtonDeal, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
+ .addContainerGap())
);
getContentPane().add(jPanelEast, java.awt.BorderLayout.EAST);
jPanelWest.setBackground(new java.awt.Color(0, 102, 51));
+ jPanelWest.setForeground(new java.awt.Color(0, 204, 51));
jPanelWest.setPreferredSize(new java.awt.Dimension(150, 498));
+ jLabelBalance.setBackground(new java.awt.Color(102, 102, 0));
+ jLabelBalance.setFont(new java.awt.Font("Segoe UI", 0, 24)); // NOI18N
+ jLabelBalance.setForeground(new java.awt.Color(255, 255, 0));
+ jLabelBalance.setText("R 1000");
+
+ jLabelCurrentBet.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
+ jLabelCurrentBet.setText("Current Bet:");
+
+ jLabelCurrentBetAmount.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
+ jLabelCurrentBetAmount.setText("R 100");
+
+ jButtonChangeBet.setBackground(new java.awt.Color(0, 204, 204));
+ jButtonChangeBet.setFont(new java.awt.Font("Segoe UI", 0, 18)); // NOI18N
+ jButtonChangeBet.setForeground(new java.awt.Color(102, 102, 102));
+ jButtonChangeBet.setText("<html>\nCHANGE\n<br>\n<center>BET</center>\n</html>");
+
javax.swing.GroupLayout jPanelWestLayout = new javax.swing.GroupLayout(jPanelWest);
jPanelWest.setLayout(jPanelWestLayout);
jPanelWestLayout.setHorizontalGroup(
jPanelWestLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 150, Short.MAX_VALUE)
+ .addGroup(jPanelWestLayout.createSequentialGroup()
+ .addGap(20, 20, 20)
+ .addGroup(jPanelWestLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jButtonChangeBet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabelCurrentBetAmount)
+ .addComponent(jLabelCurrentBet)
+ .addComponent(jLabelBalance))
+ .addContainerGap(25, Short.MAX_VALUE))
);
jPanelWestLayout.setVerticalGroup(
jPanelWestLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 498, Short.MAX_VALUE)
+ .addGroup(jPanelWestLayout.createSequentialGroup()
+ .addGap(114, 114, 114)
+ .addComponent(jLabelBalance, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(33, 33, 33)
+ .addComponent(jLabelCurrentBet)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabelCurrentBetAmount)
+ .addGap(32, 32, 32)
+ .addComponent(jButtonChangeBet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(270, Short.MAX_VALUE))
);
getContentPane().add(jPanelWest, java.awt.BorderLayout.WEST);
@@ -166,15 +209,93 @@ public class MainUI extends javax.swing.JFrame {
jPanelCenter.setBackground(new java.awt.Color(0, 102, 51));
jPanelCenter.setPreferredSize(new java.awt.Dimension(400, 498));
+ jPanelDealer.setBackground(new java.awt.Color(0, 102, 51));
+
+ jPanelDealerText.setBackground(new java.awt.Color(0, 102, 51));
+
+ jLabelDealer1.setFont(new java.awt.Font("Segoe UI", 0, 30)); // NOI18N
+ jLabelDealer1.setText("Dealer: 13");
+
+ javax.swing.GroupLayout jPanelDealerTextLayout = new javax.swing.GroupLayout(jPanelDealerText);
+ jPanelDealerText.setLayout(jPanelDealerTextLayout);
+ jPanelDealerTextLayout.setHorizontalGroup(
+ jPanelDealerTextLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelDealerTextLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabelDealer1)
+ .addContainerGap(411, Short.MAX_VALUE))
+ );
+ jPanelDealerTextLayout.setVerticalGroup(
+ jPanelDealerTextLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelDealerTextLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabelDealer1)
+ .addContainerGap(52, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout jPanelDealerLayout = new javax.swing.GroupLayout(jPanelDealer);
+ jPanelDealer.setLayout(jPanelDealerLayout);
+ jPanelDealerLayout.setHorizontalGroup(
+ jPanelDealerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanelDealerText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ jPanelDealerLayout.setVerticalGroup(
+ jPanelDealerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelDealerLayout.createSequentialGroup()
+ .addComponent(jPanelDealerText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(0, 181, Short.MAX_VALUE))
+ );
+
+ jPanelPlayer.setBackground(new java.awt.Color(0, 102, 51));
+
+ jPanelPlayerText.setBackground(new java.awt.Color(0, 102, 51));
+
+ jLabelDealer.setFont(new java.awt.Font("Segoe UI", 0, 30)); // NOI18N
+ jLabelDealer.setText("Player: 13");
+
+ javax.swing.GroupLayout jPanelPlayerTextLayout = new javax.swing.GroupLayout(jPanelPlayerText);
+ jPanelPlayerText.setLayout(jPanelPlayerTextLayout);
+ jPanelPlayerTextLayout.setHorizontalGroup(
+ jPanelPlayerTextLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelPlayerTextLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabelDealer)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ jPanelPlayerTextLayout.setVerticalGroup(
+ jPanelPlayerTextLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelPlayerTextLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabelDealer)
+ .addContainerGap(43, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout jPanelPlayerLayout = new javax.swing.GroupLayout(jPanelPlayer);
+ jPanelPlayer.setLayout(jPanelPlayerLayout);
+ jPanelPlayerLayout.setHorizontalGroup(
+ jPanelPlayerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanelPlayerText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ jPanelPlayerLayout.setVerticalGroup(
+ jPanelPlayerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanelPlayerLayout.createSequentialGroup()
+ .addComponent(jPanelPlayerText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(0, 242, Short.MAX_VALUE))
+ );
+
javax.swing.GroupLayout jPanelCenterLayout = new javax.swing.GroupLayout(jPanelCenter);
jPanelCenter.setLayout(jPanelCenterLayout);
jPanelCenterLayout.setHorizontalGroup(
jPanelCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 549, Short.MAX_VALUE)
+ .addComponent(jPanelDealer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jPanelPlayer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanelCenterLayout.setVerticalGroup(
jPanelCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGap(0, 498, Short.MAX_VALUE)
+ .addGroup(jPanelCenterLayout.createSequentialGroup()
+ .addComponent(jPanelDealer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(jPanelPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
getContentPane().add(jPanelCenter, java.awt.BorderLayout.CENTER);
@@ -215,15 +336,25 @@ public class MainUI extends javax.swing.JFrame {
}
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton jButtonChangeBet;
private javax.swing.JButton jButtonDeal;
private javax.swing.JButton jButtonDoubleDown;
private javax.swing.JButton jButtonHit;
private javax.swing.JButton jButtonStand;
private javax.swing.JButton jButtonSurrender;
+ private javax.swing.JLabel jLabelBalance;
+ private javax.swing.JLabel jLabelCurrentBet;
+ private javax.swing.JLabel jLabelCurrentBetAmount;
+ private javax.swing.JLabel jLabelDealer;
+ private javax.swing.JLabel jLabelDealer1;
private javax.swing.JLabel jLabelResult;
private javax.swing.JPanel jPanelCenter;
+ private javax.swing.JPanel jPanelDealer;
+ private javax.swing.JPanel jPanelDealerText;
private javax.swing.JPanel jPanelEast;
private javax.swing.JPanel jPanelNorth;
+ private javax.swing.JPanel jPanelPlayer;
+ private javax.swing.JPanel jPanelPlayerText;
private javax.swing.JPanel jPanelWest;
// End of variables declaration//GEN-END:variables
}