-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_GUImain.java
113 lines (91 loc) · 3.11 KB
/
1_GUImain.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package MyPackage1;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Properties;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import org.jdatepicker.impl.JDatePanelImpl;
import org.jdatepicker.impl.JDatePickerImpl;
import org.jdatepicker.impl.UtilDateModel;
import java.awt.Font;
public class GUImain implements ActionListener {
protected static JLabel userLabel;
protected static JTextField userText;
protected static JLabel passwordLabel;
protected static JPasswordField passwordText;
protected static JButton button;
protected static JLabel success;
protected static JLabel fname;
protected static JTextField fnameText;
protected static JLabel lname;
protected static JTextField lnameText;
protected static JLabel radioLabel;
protected static JRadioButton radioButton1;
protected static JLabel rbLabel1;
protected static JLabel rbLabel2;
protected static JLabel rbLabel3;
protected static JRadioButton radioButton2;
protected static JRadioButton radioButton3;
protected static JLabel dateLabel;
protected static UtilDateModel model;
protected static JDatePanelImpl datePanel;
protected static JDatePickerImpl datePicker;
protected static JLabel addressLabel;
protected static JTextField addressText;
protected static JLabel phoneLabel;
protected static JTextField phoneText;
protected static JLabel emailLabel;
protected static JTextField emailText;
protected static JLabel userNameLabel;
protected static JTextField userNameText;
protected static JLabel pwdLabel;
protected static JPasswordField pwdText;
protected static JLabel pwdLabel1;
protected static JPasswordField pwdText1;
protected static JLabel result;
protected static JButton submit;
protected static JButton button1;
protected static JButton button2;
public static void main(String[] args) {
JFrame frame = new JFrame("Main GUI");
JPanel panel = new JPanel();
frame.setSize(500, 500);
frame.setMinimumSize(new Dimension(300,300));
frame.setMaximumSize(new Dimension(600,600));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(panel);
panel.setLayout(null);
button1 = new JButton("Login");
button1.setFont(new Font("Times New Roman", Font.BOLD, 20));
button1.setBounds(95,169,131,66);
panel.add(button1);
button1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent arg0) {
Login1 l1 = new Login1();
}
});
button2 = new JButton("Register");
button2.setFont(new Font("Times New Roman", Font.BOLD, 20));
button2.setBounds(261,169,123,66);
panel.add(button2);
button2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e){
Register1 r1 = new Register1();
}
});
frame.setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
}
}