labelGames.setText("Games");
dateChooser.addPropertyChangeListener(formListener);
GroupLayout panelGameInfoLayout = new GroupLayout(panelGameInfo);
panelGameInfo.setLayout(panelGameInfoLayout);
panelGameInfoLayout.setHorizontalGroup(
panelGameInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelGameInfoLayout.createSequentialGroup()
.addContainerGap()
.add(panelGameInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, panelGameInfoLayout.createSequentialGroup()
.add(comboBoxGames, GroupLayout.PREFERRED_SIZE, 135, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(buttonLoadGames)
.add(149, 149, 149))
.add(panelGameInfoLayout.createSequentialGroup()
.add(labelTables)
.addContainerGap(172, Short.MAX_VALUE))
.add(panelGameInfoLayout.createSequentialGroup()
.add(panelGameInfoLayout.createParallelGroup(GroupLayout.TRAILING, false)
.add(GroupLayout.LEADING, dateChooser, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(GroupLayout.LEADING, panelGameInfoLayout.createSequentialGroup()
.add(comboBoxTables, GroupLayout.PREFERRED_SIZE, 135, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(buttonLoadTables))
.add(GroupLayout.LEADING, labelGames))
.addContainerGap())))
);
panelGameInfoLayout.setVerticalGroup(
panelGameInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, panelGameInfoLayout.createSequentialGroup()
.add(dateChooser, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(labelTables)
.addPreferredGap(LayoutStyle.RELATED)
.add(panelGameInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(comboBoxTables, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(buttonLoadTables))
.add(9, 9, 9)
.add(labelGames)
.addPreferredGap(LayoutStyle.RELATED)
.add(panelGameInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(comboBoxGames, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(buttonLoadGames))
.add(207, 207, 207))
);
panelTableInfo.setBorder(BorderFactory.createTitledBorder("Table Info"));
labelGameType.setText("Game Type");
textGameType.setEditable(false);
textGameType.setInheritsPopupMenu(true);
labelLimitType.setText("Limit Type");
textLimitType.setEditable(false);
labelMoneyType.setText("Money Type");
textMoneyType.setEditable(false);
textBlinds.setEditable(false);
labelBlinds.setText("Blinds");
GroupLayout panelTableInfoLayout = new GroupLayout(panelTableInfo);
panelTableInfo.setLayout(panelTableInfoLayout);
panelTableInfoLayout.setHorizontalGroup(
panelTableInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTableInfoLayout.createSequentialGroup()
.add(panelTableInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTableInfoLayout.createSequentialGroup()
.add(labelGameType)
.addPreferredGap(LayoutStyle.RELATED, 29, Short.MAX_VALUE)
.add(textGameType, GroupLayout.PREFERRED_SIZE, 131, GroupLayout.PREFERRED_SIZE))
.add(panelTableInfoLayout.createSequentialGroup()
.add(labelLimitType)
.addPreferredGap(LayoutStyle.RELATED, 35, Short.MAX_VALUE)
.add(textLimitType, GroupLayout.PREFERRED_SIZE, 131, GroupLayout.PREFERRED_SIZE))
.add(panelTableInfoLayout.createSequentialGroup()
.add(labelMoneyType)
.addPreferredGap(LayoutStyle.RELATED, 24, Short.MAX_VALUE)
.add(textMoneyType, GroupLayout.PREFERRED_SIZE, 131, GroupLayout.PREFERRED_SIZE))
.add(panelTableInfoLayout.createSequentialGroup()
.add(labelBlinds)
.addPreferredGap(LayoutStyle.RELATED, 56, Short.MAX_VALUE)
.add(textBlinds, GroupLayout.PREFERRED_SIZE, 131, GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
panelTableInfoLayout.setVerticalGroup(
panelTableInfoLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTableInfoLayout.createSequentialGroup()
.addContainerGap()
.add(panelTableInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelGameType)
.add(textGameType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelTableInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelLimitType)
.add(textLimitType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelTableInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelMoneyType)
.add(textMoneyType, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelTableInfoLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelBlinds)
.add(textBlinds, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(16, Short.MAX_VALUE))
);
panelMoneyStats.setBorder(BorderFactory.createTitledBorder("Money Stats"));
labelStatsStart.setText("Start");
textStartMoney.setEditable(false);
textStartMoney.setMinimumSize(new Dimension(60, 20));
textStartMoney.setPreferredSize(new Dimension(60, 20));
labelStatsEnd.setText("End");
textEndMoney.setEditable(false);
textEndMoney.setMinimumSize(new Dimension(60, 20));
textEndMoney.setPreferredSize(new Dimension(60, 20));
labelStatsWon.setText("Won");
textTotalWon.setEditable(false);
textTotalWon.setMinimumSize(new Dimension(60, 20));
textTotalWon.setPreferredSize(new Dimension(60, 20));
textStatus.setEditable(false);
textStatus.setMinimumSize(new Dimension(60, 20));
textStatus.setPreferredSize(new Dimension(60, 20));
labelStatsStatus.setText("Status");
GroupLayout panelMoneyStatsLayout = new GroupLayout(panelMoneyStats);
panelMoneyStats.setLayout(panelMoneyStatsLayout);
panelMoneyStatsLayout.setHorizontalGroup(
panelMoneyStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelMoneyStatsLayout.createSequentialGroup()
.add(labelStatsStart)
.addPreferredGap(LayoutStyle.RELATED)
.add(textStartMoney, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(labelStatsEnd)
.addPreferredGap(LayoutStyle.RELATED)
.add(textEndMoney, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelStatsWon)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTotalWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelStatsStatus)
.addPreferredGap(LayoutStyle.RELATED)
.add(textStatus, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addContainerGap(86, Short.MAX_VALUE))
);
panelMoneyStatsLayout.setVerticalGroup(
panelMoneyStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelMoneyStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelStatsStart)
.add(textStartMoney, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelStatsEnd)
.add(textEndMoney, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelStatsWon)
.add(textTotalWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelStatsStatus)
.add(textStatus, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
);
panelPokerStats.setBorder(BorderFactory.createTitledBorder("Poker Stats"));
labelHandsPlayed.setText("Hands Played");
labelHandsPlayed.setMaximumSize(new Dimension(75, 15));
labelHandsPlayed.setMinimumSize(new Dimension(75, 15));
labelHandsPlayed.setPreferredSize(new Dimension(75, 15));
textHandsPlayed.setEditable(false);
textHandsPlayed.setMinimumSize(new Dimension(60, 20));
textHandsPlayed.setPreferredSize(new Dimension(60, 20));
labelTimesMucked.setText("Times Mucked");
labelTimesMucked.setMaximumSize(new Dimension(75, 15));
labelTimesMucked.setMinimumSize(new Dimension(75, 15));
labelTimesMucked.setPreferredSize(new Dimension(75, 15));
textTimesMucked.setEditable(false);
textTimesMucked.setMinimumSize(new Dimension(60, 20));
textTimesMucked.setPreferredSize(new Dimension(60, 20));
textTimesWon.setEditable(false);
textTimesWon.setMinimumSize(new Dimension(60, 20));
textTimesWon.setPreferredSize(new Dimension(60, 20));
labelTimesWon.setText("Times Won");
labelTimesWon.setMaximumSize(new Dimension(75, 15));
labelTimesWon.setMinimumSize(new Dimension(75, 15));
labelTimesWon.setPreferredSize(new Dimension(75, 15));
textTimesBet.setEditable(false);
textTimesBet.setMinimumSize(new Dimension(60, 20));
textTimesBet.setPreferredSize(new Dimension(60, 20));
labelTimesBet.setText("Times Bet");
labelTimesBet.setMaximumSize(new Dimension(75, 15));
labelTimesBet.setMinimumSize(new Dimension(75, 15));
labelTimesBet.setPreferredSize(new Dimension(75, 15));
labelDontShow.setText("Don't Show");
labelDontShow.setMaximumSize(new Dimension(75, 15));
labelDontShow.setMinimumSize(new Dimension(75, 15));
labelDontShow.setPreferredSize(new Dimension(75, 15));
textTimesCalled.setEditable(false);
textTimesCalled.setMinimumSize(new Dimension(60, 20));
textTimesCalled.setPreferredSize(new Dimension(60, 20));
labelTimesCalled.setText("Times Called");
labelTimesCalled.setMaximumSize(new Dimension(75, 15));
labelTimesCalled.setMinimumSize(new Dimension(75, 15));
labelTimesCalled.setPreferredSize(new Dimension(75, 15));
textDontShow.setEditable(false);
textDontShow.setMinimumSize(new Dimension(60, 20));
textDontShow.setPreferredSize(new Dimension(60, 20));
labelShowdowns.setText("Showdowns");
labelShowdowns.setMaximumSize(new Dimension(75, 15));
labelShowdowns.setMinimumSize(new Dimension(75, 15));
labelShowdowns.setPreferredSize(new Dimension(75, 15));
textShowdowns.setEditable(false);
textShowdowns.setMinimumSize(new Dimension(60, 20));
textShowdowns.setPreferredSize(new Dimension(60, 20));
labelTimesFolded.setText("Times Folded");
labelTimesFolded.setMaximumSize(new Dimension(75, 15));
labelTimesFolded.setMinimumSize(new Dimension(75, 15));
labelTimesFolded.setPreferredSize(new Dimension(75, 15));
textTimesFolded.setEditable(false);
textTimesFolded.setMinimumSize(new Dimension(60, 20));
textTimesFolded.setPreferredSize(new Dimension(60, 20));
labelTimesSmallBlind.setText("Times Small Blind");
labelTimesSmallBlind.setMaximumSize(new Dimension(75, 15));
labelTimesSmallBlind.setMinimumSize(new Dimension(75, 15));
labelTimesSmallBlind.setPreferredSize(new Dimension(75, 15));
textTimesSmallBlind.setEditable(false);
textTimesSmallBlind.setMinimumSize(new Dimension(60, 20));
textTimesSmallBlind.setPreferredSize(new Dimension(60, 20));
labelTimesBigBlind.setText("Times Big Blind");
labelTimesBigBlind.setMaximumSize(new Dimension(75, 15));
labelTimesBigBlind.setMinimumSize(new Dimension(75, 15));
labelTimesBigBlind.setPreferredSize(new Dimension(75, 15));
textTimesBigBlind.setEditable(false);
textTimesBigBlind.setMinimumSize(new Dimension(60, 20));
textTimesBigBlind.setPreferredSize(new Dimension(60, 20));
labelTimesAllIn.setText("Times All-in");
labelTimesAllIn.setMaximumSize(new Dimension(75, 15));
labelTimesAllIn.setMinimumSize(new Dimension(75, 15));
labelTimesAllIn.setPreferredSize(new Dimension(75, 15));
textTimesAllIn.setEditable(false);
textTimesAllIn.setMinimumSize(new Dimension(60, 20));
textTimesAllIn.setPreferredSize(new Dimension(60, 20));
GroupLayout panelPokerStatsLayout = new GroupLayout(panelPokerStats);
panelPokerStats.setLayout(panelPokerStatsLayout);
panelPokerStatsLayout.setHorizontalGroup(
panelPokerStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelPokerStatsLayout.createSequentialGroup()
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.TRAILING)
.add(panelPokerStatsLayout.createSequentialGroup()
.add(labelTimesFolded, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesFolded, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelShowdowns, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textShowdowns, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelPokerStatsLayout.createSequentialGroup()
.add(labelHandsPlayed, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textHandsPlayed, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelTimesMucked, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesMucked, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.add(panelPokerStatsLayout.createSequentialGroup()
.add(labelTimesBet, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesBet, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelTimesWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.add(panelPokerStatsLayout.createSequentialGroup()
.add(labelTimesCalled, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesCalled, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelDontShow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textDontShow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))
.add(10, 10, 10)
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.TRAILING)
.add(panelPokerStatsLayout.createSequentialGroup()
.add(labelTimesSmallBlind, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)
.add(8, 8, 8))
.add(panelPokerStatsLayout.createSequentialGroup()
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.TRAILING)
.add(labelTimesAllIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesBigBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.add(18, 18, 18)))
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(textTimesAllIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesSmallBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesBigBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
);
panelPokerStatsLayout.setVerticalGroup(
panelPokerStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelPokerStatsLayout.createSequentialGroup()
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelPokerStatsLayout.createSequentialGroup()
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelHandsPlayed, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textHandsPlayed, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesMucked, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesMucked, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelTimesBet, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesBet, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesWon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesBigBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelTimesCalled, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesCalled, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelDontShow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textDontShow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesAllIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.add(panelPokerStatsLayout.createSequentialGroup()
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(textTimesSmallBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelTimesSmallBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesBigBlind, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(textTimesAllIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelPokerStatsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelTimesFolded, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textTimesFolded, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(labelShowdowns, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(textShowdowns, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
panelHistory.setBorder(BorderFactory.createTitledBorder("Hand History"));
labelMyHistory.setText("Personal History");
labelFullHistory.setText("Complete History");
textFullHistory.setColumns(20);
textFullHistory.setEditable(false);
textFullHistory.setFont(new Font("Microsoft Sans Serif", 0, 10));
textFullHistory.setRows(5);
textFullHistory.setTabSize(4);
jScrollPane1.setViewportView(textFullHistory);
textMyHistory.setColumns(20);
textMyHistory.setEditable(false);
textMyHistory.setFont(new Font("Microsoft Sans Serif", 0, 10));
textMyHistory.setRows(5);
textMyHistory.setTabSize(4);
jScrollPane2.setViewportView(textMyHistory);
GroupLayout panelHistoryLayout = new GroupLayout(panelHistory);
panelHistory.setLayout(panelHistoryLayout);
panelHistoryLayout.setHorizontalGroup(
panelHistoryLayout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, panelHistoryLayout.createSequentialGroup()
.addContainerGap()
.add(panelHistoryLayout.createParallelGroup(GroupLayout.TRAILING)
.add(GroupLayout.LEADING, jScrollPane2, GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
.add(panelHistoryLayout.createSequentialGroup()
.add(labelFullHistory)
.add(118, 118, 118))
.add(panelHistoryLayout.createSequentialGroup()
.add(labelMyHistory)
.add(122, 122, 122))
.add(GroupLayout.LEADING, jScrollPane1, GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
.addContainerGap())
);
panelHistoryLayout.setVerticalGroup(
panelHistoryLayout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, panelHistoryLayout.createSequentialGroup()
.add(labelFullHistory)
.addPreferredGap(LayoutStyle.RELATED)
.add(jScrollPane1, GroupLayout.PREFERRED_SIZE, 236, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelMyHistory)
.addPreferredGap(LayoutStyle.RELATED)
.add(jScrollPane2, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE)
.add(351, 351, 351))
);
panelCards.setBorder(BorderFactory.createTitledBorder("Cards "));
labelHole1.setIcon(AppUtil.loadImage("/Sprites/Ts.png"));
labelHole2.setIcon(AppUtil.loadImage("/Sprites/Js.png"));
labelFlop1.setIcon(AppUtil.loadImage("/Sprites/Qs.png"));
labelFlop2.setIcon(AppUtil.loadImage("/Sprites/Ks.png"));
labelFlop3.setIcon(AppUtil.loadImage("/Sprites/As.png"));
labelTurn.setIcon(AppUtil.loadImage("/Sprites/faceDown.png"));
labelRiver.setIcon(AppUtil.loadImage("/Sprites/faceDown.png"));
GroupLayout panelCardsLayout = new GroupLayout(panelCards);
panelCards.setLayout(panelCardsLayout);
panelCardsLayout.setHorizontalGroup(
panelCardsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelCardsLayout.createSequentialGroup()
.addContainerGap()
.add(labelHole1, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelHole2, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.add(42, 42, 42)
.add(labelFlop1, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelFlop2, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelFlop3, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelTurn, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(labelRiver, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
.addContainerGap(9, Short.MAX_VALUE))
);
panelCardsLayout.setVerticalGroup(
panelCardsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelCardsLayout.createSequentialGroup()
.add(panelCardsLayout.createParallelGroup(GroupLayout.BASELINE)
.add(labelHole1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelFlop1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelFlop2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelFlop3, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelTurn, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelRiver, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
.add(labelHole2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE))
.addContainerGap(20, Short.MAX_VALUE))
);
GroupLayout panelTabMainLayout = new GroupLayout(panelTabMain);
panelTabMain.setLayout(panelTabMainLayout);
panelTabMainLayout.setHorizontalGroup(
panelTabMainLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTabMainLayout.createSequentialGroup()
.addContainerGap()
.add(panelTabMainLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelCards, 0, 467, Short.MAX_VALUE)
.add(panelTabMainLayout.createParallelGroup(GroupLayout.LEADING, false)
.add(panelTabMainLayout.createSequentialGroup()
.add(panelGameInfo, GroupLayout.PREFERRED_SIZE, 225, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(panelTableInfo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(panelMoneyStats, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(panelPokerStats, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelHistory, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
panelTabMainLayout.setVerticalGroup(
panelTabMainLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTabMainLayout.createSequentialGroup()
.addContainerGap()
.add(panelTabMainLayout.createParallelGroup(GroupLayout.TRAILING, false)
.add(GroupLayout.LEADING, panelHistory, 0, 480, Short.MAX_VALUE)
.add(GroupLayout.LEADING, panelTabMainLayout.createSequentialGroup()
.add(panelTabMainLayout.createParallelGroup(GroupLayout.LEADING, false)
.add(panelGameInfo, 0, 152, Short.MAX_VALUE)
.add(panelTableInfo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(LayoutStyle.RELATED)
.add(panelMoneyStats, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(panelPokerStats, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(panelCards, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.add(355, 355, 355))
);
jTabbedPanel.addTab("Main", panelTabMain);
panelTabStats.setMaximumSize(new Dimension(740, 590));
panelTabStats.setPreferredSize(new Dimension(740, 590));
tableStats.setModel(new DefaultTableModel(
new Object[][]{
{"All", null, null, null, null},
{"Pair", null, null, null, null},
{"High Pair", null, null, null, null},
{"Low Pair", null, null, null, null},
{"AA", null, null, null, null},
{"KK", null, null, null, null},
{"QQ", null, null, null, null},
{"JJ", null, null, null, null},
{"AK", null, null, null, null},
{"J10", null, null, null, null},
{"Connected", null, null, null, null},
{"Suited", null, null, null, null},
{"Face + High Kicker", null, null, null, null},
{"Face + Low Kicker", null, null, null, null}
},
new String[]{
".:Hand:.", "Total Played", "Percentage", "Total Won", "Percentage"
}
) {
Class[] types = new Class[]{
String.class, String.class, String.class, String.class, String.class
};
boolean[] canEdit = new boolean[]{
false, false, false, false, false
};
public Class getColumnClass(int columnIndex) {
return types[columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit[columnIndex];
}
});
tableStats.setColumnSelectionAllowed(true);
tableStats.setComponentPopupMenu(jPopupMenu);
scrollPane.setViewportView(tableStats);
tableStats.getColumnModel().getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
buttonCalc.setText("Calc Stats");
buttonCalc.addMouseListener(formListener);
GroupLayout panelTabStatsLayout = new GroupLayout(panelTabStats);
panelTabStats.setLayout(panelTabStatsLayout);
panelTabStatsLayout.setHorizontalGroup(
panelTabStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTabStatsLayout.createSequentialGroup()
.addContainerGap()
.add(panelTabStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(scrollPane, GroupLayout.DEFAULT_SIZE, 705, Short.MAX_VALUE)
.add(buttonCalc))
.addContainerGap())
);
panelTabStatsLayout.setVerticalGroup(
panelTabStatsLayout.createParallelGroup(GroupLayout.LEADING)
.add(panelTabStatsLayout.createSequentialGroup()
.addContainerGap()
.add(scrollPane, GroupLayout.PREFERRED_SIZE, 293, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(buttonCalc)
.addContainerGap(163, Short.MAX_VALUE))
);
jTabbedPanel.addTab("Statistics", panelTabStats);
jToolBar.setFloatable(false);
jToolBar.setRollover(true);
buttonAnalyseHand.setText("Analyse Hand");
buttonAnalyseHand.setToolTipText("Analyse and display the current hand");
buttonAnalyseHand.setFocusable(false);
buttonAnalyseHand.setHorizontalTextPosition(SwingConstants.CENTER);
buttonAnalyseHand.setVerticalTextPosition(SwingConstants.BOTTOM);
buttonAnalyseHand.addMouseListener(formListener);
jToolBar.add(buttonAnalyseHand);
buttonReset.setText("Reset");
buttonReset.setToolTipText("Reset all the fields on the form");
buttonReset.setFocusable(false);
buttonReset.setHorizontalTextPosition(SwingConstants.CENTER);
buttonReset.setVerticalTextPosition(SwingConstants.BOTTOM);
buttonReset.addMouseListener(formListener);
jToolBar.add(buttonReset);
labelPKRicon.setIcon(AppUtil.loadImage("/logo.png"));
GroupLayout mainPanelLayout = new GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.addContainerGap()
.add(mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(jToolBar, GroupLayout.PREFERRED_SIZE, 390, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED, 126, Short.MAX_VALUE)
.add(labelPKRicon, GroupLayout.PREFERRED_SIZE, 215, GroupLayout.PREFERRED_SIZE))
.add(jTabbedPanel, GroupLayout.PREFERRED_SIZE, 730, GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(mainPanelLayout.createSequentialGroup()
.add(mainPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(jToolBar, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
.add(labelPKRicon, GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
.addPreferredGap(LayoutStyle.RELATED)
.add(jTabbedPanel, GroupLayout.PREFERRED_SIZE, 524, GroupLayout.PREFERRED_SIZE)
.addContainerGap(36, Short.MAX_VALUE))
);
fileMenu.setText("File");
reloadMenuItem.setText("Reload DB");
reloadMenuItem.setToolTipText("This will delete and recreate the database based on what you currently have in your PKR directory");
reloadMenuItem.addMouseListener(formListener);
fileMenu.add(reloadMenuItem);
exitMenuItem.setText("Exit");
exitMenuItem.setToolTipText("Exit the application");
exitMenuItem.addMouseListener(formListener);
fileMenu.add(exitMenuItem);
menuBar.add(fileMenu);
toolsMenu.setText("Tools");
analyseMenu.setText("Analyse");
gameMenuItem.setText("Hand");
gameMenuItem.setToolTipText("Analyse the current Hand");
gameMenuItem.addMouseListener(formListener);
analyseMenu.add(gameMenuItem);
tableMenuItem.setText("Table");
tableMenuItem.setToolTipText("Analyse current Table");
tableMenuItem.addMouseListener(formListener);
analyseMenu.add(tableMenuItem);
dayMenuItem.setText("Day");
dayMenuItem.setToolTipText("Analyse the current Day");
dayMenuItem.addMouseListener(formListener);
analyseMenu.add(dayMenuItem);
allMenuItem.setText("All");
allMenuItem.setToolTipText("Analyse everything");
allMenuItem.addMouseListener(formListener);
analyseMenu.add(allMenuItem);
toolsMenu.add(analyseMenu);
resetToolsMenuItem.setText("Reset");
resetToolsMenuItem.setToolTipText("Reset all the fields on the form");
resetToolsMenuItem.addMouseListener(formListener);
toolsMenu.add(resetToolsMenuItem);
optionsMenuItem.setText("Options");
optionsMenuItem.setToolTipText("Open the options dialog");
optionsMenuItem.addMouseListener(formListener);
toolsMenu.add(optionsMenuItem);
menuBar.add(toolsMenu);
helpMenu.setText("Help");
helpMenuItem.setText("Help");
helpMenuItem.setToolTipText("Get Help");
helpMenuItem.addMouseListener(formListener);
helpMenu.add(helpMenuItem);
aboutMenuItem.setText("About");
aboutMenuItem.setToolTipText("Open the About dialog");
aboutMenuItem.addMouseListener(formListener);
helpMenu.add(aboutMenuItem);
menuBar.add(helpMenu);
setJMenuBar(menuBar);
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(0, 751, Short.MAX_VALUE)
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(0, 0, Short.MAX_VALUE)
.add(mainPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(0, 0, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(0, 591, Short.MAX_VALUE)
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(0, 0, Short.MAX_VALUE)
.add(mainPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(0, 0, Short.MAX_VALUE)))
);