Possibility of registering new owners added
[RRRRHHHH_Code] / ruralHouses / src / gui / LoginGUI.java
index 1e59e89..ab22f39 100644 (file)
@@ -25,6 +25,7 @@ public class LoginGUI extends JFrame {
        private JPasswordField passwordField;
        private LoginManagerInterface loginManager = new LoginManager();
        private JLabel loginFeedback;
+       private JButton btnRegister;
        public LoginGUI() {
                super();
                initialize();
@@ -66,7 +67,7 @@ public class LoginGUI extends JFrame {
                                jButton_ActionPerformed(arg0);  
                                }                                       
                        });
-                       loginButton.setBounds(164, 179, 117, 25);
+                       loginButton.setBounds(95, 179, 117, 25);
                        jContentPane.add(loginButton);
                        
                        loginFeedback = new JLabel("");
@@ -74,10 +75,28 @@ public class LoginGUI extends JFrame {
                        loginFeedback.setHorizontalAlignment(SwingConstants.CENTER);
                        loginFeedback.setBounds(83, 216, 269, 25);
                        jContentPane.add(loginFeedback);
+                       
+                       btnRegister = new JButton("Register");
+                       btnRegister.setBounds(222, 180, 113, 23);
+                       btnRegister.addActionListener(new ActionListener() {
+                               public void actionPerformed(ActionEvent arg0) {
+
+                               jButton_ActionPerformed2(arg0); 
+                               }                                       
+                       });
+                       jContentPane.add(btnRegister);
                }
                return jContentPane;
        }
-       
+       private void jButton_ActionPerformed2(ActionEvent e){
+               
+               
+                       this.setVisible(false);
+                       Frame a = new OwnerRegistrationGUI();
+                       a.setVisible(true);
+               
+               
+       }
        private void jButton_ActionPerformed(ActionEvent e){
                        
                Account acc = loginManager.checkCredentials(usernameField.getText(),new String(passwordField.getPassword()));