RRRRHHHH_Code
Diff Revisions
0f75b2 ...
vs
7bf57b ...
for ruralHouses/src/gui/LoginGUI.java
|
@@ -25,6 +25,7 @@ |
25 |
25 |
|
private JPasswordField passwordField; |
26 |
26 |
|
private LoginManagerInterface loginManager = new LoginManager(); |
27 |
27 |
|
private JLabel loginFeedback; |
|
28 |
+ |
private JButton btnRegister; |
28 |
29 |
|
public LoginGUI() { |
29 |
30 |
|
super(); |
30 |
31 |
|
initialize(); |
|
@@ -66,7 +67,7 @@ |
66 |
67 |
|
jButton_ActionPerformed(arg0); |
67 |
68 |
|
} |
68 |
69 |
|
}); |
69 |
|
- |
loginButton.setBounds(164, 179, 117, 25); |
|
70 |
+ |
loginButton.setBounds(95, 179, 117, 25); |
70 |
71 |
|
jContentPane.add(loginButton); |
71 |
72 |
|
|
72 |
73 |
|
loginFeedback = new JLabel(""); |
|
@@ -74,10 +75,28 @@ |
74 |
75 |
|
loginFeedback.setHorizontalAlignment(SwingConstants.CENTER); |
75 |
76 |
|
loginFeedback.setBounds(83, 216, 269, 25); |
76 |
77 |
|
jContentPane.add(loginFeedback); |
|
78 |
+ |
|
|
79 |
+ |
btnRegister = new JButton("Register"); |
|
80 |
+ |
btnRegister.setBounds(222, 180, 113, 23); |
|
81 |
+ |
btnRegister.addActionListener(new ActionListener() { |
|
82 |
+ |
public void actionPerformed(ActionEvent arg0) { |
|
83 |
+ |
|
|
84 |
+ |
jButton_ActionPerformed2(arg0); |
|
85 |
+ |
} |
|
86 |
+ |
}); |
|
87 |
+ |
jContentPane.add(btnRegister); |
77 |
88 |
|
} |
78 |
89 |
|
return jContentPane; |
79 |
90 |
|
} |
80 |
|
- |
|
|
91 |
+ |
private void jButton_ActionPerformed2(ActionEvent e){ |
|
92 |
+ |
|
|
93 |
+ |
|
|
94 |
+ |
this.setVisible(false); |
|
95 |
+ |
Frame a = new OwnerRegistrationGUI(); |
|
96 |
+ |
a.setVisible(true); |
|
97 |
+ |
|
|
98 |
+ |
|
|
99 |
+ |
} |
81 |
100 |
|
private void jButton_ActionPerformed(ActionEvent e){ |
82 |
101 |
|
|
83 |
102 |
|
Account acc = loginManager.checkCredentials(usernameField.getText(),new String(passwordField.getPassword())); |