Skip to content
Permalink
Browse files

endturn button added to maintab

  • Loading branch information
Sadiya Sadiya
Sadiya authored and Sadiya committed Apr 23, 2017
1 parent 918fd8b commit be35d7b038e3816faa908943491c19ea1a13aae1
Showing with 24 additions and 7 deletions.
  1. BIN bin/view/FSWindow.class
  2. +24 −7 src/view/FSWindow.java
BIN +351 Bytes (100%) bin/view/FSWindow.class
Binary file not shown.
@@ -44,6 +44,11 @@ private void prepareGUI(Player p)
JPanel mainTab = new JPanel();

mainTab.setLayout(new BoxLayout(mainTab, BoxLayout.Y_AXIS));

// JLabel name = new JLabel();
// JTextField playername = new JTextField(p.getNameI|());
// name.add(playername);
// mainTab.add(name);

JLabel salary = new JLabel();
JTextField salarynum = new JTextField(currentFS.getSalary());
@@ -56,7 +61,7 @@ private void prepareGUI(Player p)
mainTab.add(plusSymbol);

JLabel passiveincome = new JLabel();
JTextField pIncome = new JTextField(currentFS.getREcashFlow());
JTextField pIncome = new JTextField(Integer.toString(currentFS.getREcashFlow()));
passiveincome.add(pIncome);
JLabel passiveMes = new JLabel("Cash Flow from Interest/Dividends and Real Estate/Business");
passiveincome.setFont(new Font("Verdana",1,35));
@@ -72,7 +77,7 @@ private void prepareGUI(Player p)
mainTab.add(equalSymbol);

JLabel totalincome = new JLabel();
JTextField tincomenum = new JTextField(currentFS.getTotalIncome());
JTextField tincomenum = new JTextField(Integer.toString(currentFS.getTotalIncome()));
totalincome.add(tincomenum);
totalincome.setFont(new Font("Verdana",1,35));
totalincome.setAlignmentX(Component.CENTER_ALIGNMENT);
@@ -84,10 +89,10 @@ private void prepareGUI(Player p)
mainTab.add(minusSymbol);

JLabel totalexpense = new JLabel();
JTextField texpensenum = new JTextField(currentFS.getTotalExpenses());
totalincome.add(texpensenum);
totalincome.setFont(new Font("Verdana",1,35));
totalincome.setAlignmentX(Component.CENTER_ALIGNMENT);
JTextField texpensenum = new JTextField(Integer.toString(currentFS.getTotalExpenses()));
totalexpense.add(texpensenum);
totalexpense.setFont(new Font("Verdana",1,35));
totalexpense.setAlignmentX(Component.CENTER_ALIGNMENT);
mainTab.add(totalexpense);

JLabel equalSymbol2 = new JLabel("=");
@@ -96,12 +101,24 @@ private void prepareGUI(Player p)
mainTab.add(equalSymbol2);

JLabel cashflow = new JLabel();
JTextField cashflownum = new JTextField(currentFS.getMonthlyCashflow());
JTextField cashflownum = new JTextField(Integer.toString(currentFS.getMonthlyCashflow()));
cashflow.add(cashflownum);
totalincome.setFont(new Font("Verdana",1,35));
totalincome.setAlignmentX(Component.CENTER_ALIGNMENT);
mainTab.add(cashflow);

//switchplayers button here
JButton endTurn = new JButton("End Turn");
endTurn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
tabbedPane.setVisible(false);
//switch to next player update method here
tabbedPane.setVisible(true);
}
});

mainTab.add(endTurn);

tabbedPane.addTab("Total CashFlow", mainTab);
tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);

0 comments on commit be35d7b

Please sign in to comment.
You can’t perform that action at this time.