Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
edited background colors and fonts
  • Loading branch information
sss13010 committed Apr 7, 2017
1 parent f8e322c commit 97af0d4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/view/SDStockCardWindow.java
Expand Up @@ -19,6 +19,7 @@ public class SDStockCardWindow {
}
private void prepareGUI(){
mainFrame = new JFrame("Small Deal");
mainFrame.getContentPane().setBackground(new Color(38, 230, 58));
mainFrame.setSize(400,250);
//need to set this to null and position everything manually
mainFrame.setLayout(new GridLayout(3, 1));
Expand All @@ -28,12 +29,14 @@ public class SDStockCardWindow {
System.exit(0);
}
});
headerLabel = new JLabel("", JLabel.CENTER);
headerLabel = new JLabel("", JLabel.CENTER);
headerLabel.setFont(headerLabel.getFont().deriveFont(Font.BOLD, 16f));
statusLabel = new JLabel("",JLabel.CENTER);
statusLabel.setSize(350,100);

controlPanel = new JPanel();
controlPanel.setLayout(new FlowLayout());
controlPanel.setBackground(new Color(38, 230, 58));

mainFrame.add(headerLabel);
mainFrame.add(controlPanel);
Expand All @@ -57,15 +60,13 @@ public class SDStockCardWindow {
public void actionPerformed(ActionEvent e) {
//put message that they BuyStockd xx dollars after 10 seconds, close window
try {
Thread.sleep(10000);
Thread.sleep(1000);
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

statusLabel.setText("You bought xx stocks");


System.exit(0);
}
});
Expand All @@ -76,7 +77,7 @@ public class SDStockCardWindow {
System.exit(0);
}
});

controlPanel.add(BuyStock);
controlPanel.add(NoStocks);
mainFrame.setVisible(true);
Expand Down

0 comments on commit 97af0d4

Please sign in to comment.