Skip to content

Commit

Permalink
Updated TransactionUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Li committed Feb 23, 2015
1 parent fe0fe23 commit 586e6d4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions MerchantRPGCSE2102/src/view/TransactionUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void mouseClicked(MouseEvent arg0) {
@Override
public void mouseClicked(MouseEvent e) {
System.out.println("SELL"); //temporary test code
createSellWindow();
}
});
btnSell.setBounds(351, 155, 169, 105);
Expand Down Expand Up @@ -105,7 +106,7 @@ public void mouseClicked(MouseEvent e) {
/**
* Will exit the transaction window
*/
public void exitWindow()
public static void exitWindow()
{
System.exit(0);
}
Expand All @@ -126,7 +127,10 @@ public void run()
frame.setBounds(100, 100, 600, 900);
JPanel contentPane = new JPanel();
contentPane = new JPanel();
contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
frame.setContentPane(contentPane);
contentPane.setLayout(null);

frame.setVisible(true);
}
});
Expand All @@ -138,6 +142,15 @@ public void run()
*/
public static void createSellWindow()
{
JFrame frame = new JFrame("Sell");
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setBounds(100, 100, 600, 900);
JPanel contentPane = new JPanel();
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
frame.setContentPane(contentPane);
contentPane.setLayout(null);

frame.setVisible(true);
}
}

0 comments on commit 586e6d4

Please sign in to comment.