source: src/main/java/negotiator/onetomany/GUI.java@ 209

Last change on this file since 209 was 209, checked in by Tim Baarslag, 5 years ago

First GUI design of one-to-many negotiation

File size: 1.0 KB
Line 
1package negotiator.onetomany;
2
3import javax.swing.JButton;
4import javax.swing.JCheckBox;
5import javax.swing.JFrame;
6import javax.swing.JLabel;
7import javax.swing.JPasswordField;
8
9import net.miginfocom.swing.MigLayout;
10
11public class GUI extends JFrame
12{
13 Main main;
14
15 public GUI(Main m)
16 {
17 super("MigLayout Basic");
18 main = m;
19
20 // Show the GUI
21 setLayout(new MigLayout("", "[grow]", "[grow]"));
22 add(new JLabel("Portfolio:" + main.getPortfolio()), "right, wrap");
23
24// add(new JTextField(), "growx, left, wrap, w 100");
25 add(new JLabel("Password:"), "right");
26 add(new JPasswordField(), "growx, left, wrap, w 100");
27 add(new JCheckBox("Remember Me"), "center, wrap, span");
28 add(new JButton("Login"), "split 2, span 2, center");
29 add(new JButton("Close"));
30 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
31 pack();
32 setLocationRelativeTo(null);
33 setVisible(true);
34 }
35
36 public static void main(String[] args)
37 {
38 Main main = new Main();
39 GUI gui = new GUI(main);
40 }
41
42}
Note: See TracBrowser for help on using the repository browser.