1 | package negotiator.onetomany;
|
---|
2 |
|
---|
3 | import javax.swing.JButton;
|
---|
4 | import javax.swing.JCheckBox;
|
---|
5 | import javax.swing.JFrame;
|
---|
6 | import javax.swing.JLabel;
|
---|
7 | import javax.swing.JPasswordField;
|
---|
8 |
|
---|
9 | import net.miginfocom.swing.MigLayout;
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * @author Faria Nassiri-Mofakham
|
---|
13 | *
|
---|
14 | */
|
---|
15 | public class GUI extends JFrame
|
---|
16 | {
|
---|
17 | Main main;
|
---|
18 |
|
---|
19 | public GUI(Main m)
|
---|
20 | {
|
---|
21 | super("MigLayout Basic");
|
---|
22 | main = m;
|
---|
23 |
|
---|
24 | // Show the GUI
|
---|
25 | setLayout(new MigLayout("", "[grow]", "[grow]"));
|
---|
26 | add(new JLabel("Portfolio:" + main.getPortfolio()), "right, wrap");
|
---|
27 |
|
---|
28 | // add(new JTextField(), "growx, left, wrap, w 100");
|
---|
29 | add(new JLabel("Password:"), "right");
|
---|
30 | add(new JPasswordField(), "growx, left, wrap, w 100");
|
---|
31 | add(new JCheckBox("Remember Me"), "center, wrap, span");
|
---|
32 | add(new JButton("Login"), "split 2, span 2, center");
|
---|
33 | add(new JButton("Close"));
|
---|
34 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
---|
35 | pack();
|
---|
36 | setLocationRelativeTo(null);
|
---|
37 | setVisible(true);
|
---|
38 | }
|
---|
39 |
|
---|
40 | /**
|
---|
41 | * @param args
|
---|
42 | */
|
---|
43 | public static void main(String[] args)
|
---|
44 | {
|
---|
45 | Main main = new Main();
|
---|
46 | GUI gui = new GUI(main);
|
---|
47 | }
|
---|
48 |
|
---|
49 | }
|
---|