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

Last change on this file since 210 was 210, checked in by Faria Nassiri Mofakham, 5 years ago
File size: 1.1 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
11/**
12 * @author Faria Nassiri-Mofakham
13 *
14 */
15public 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}
Note: See TracBrowser for help on using the repository browser.