+
+ private void jButton_ActionPerformed(ActionEvent e){
+ Owner owner = loginManager.checkCredentials(usernameField.getText(),new String(passwordField.getPassword()));
+ if(owner==null){
+ loginFeedback.setText("Incorrect username or password");
+ }else{
+ Vector<RuralHouse> ownerHouseList=null;
+ try{
+ ownerHouseList = StartWindow.getBusinessLogic().getRuralHouses(owner);
+ }catch (Exception e1){
+ e1.printStackTrace();
+ }
+ if(!ownerHouseList.isEmpty()){
+ this.setVisible(false);
+ Frame a = new IntroduceOffer2GUI(ownerHouseList);
+ a.setVisible(true);
+ }
+ else if(ownerHouseList.isEmpty())
+ loginFeedback.setText("Login OK , but no houses in your name");
+ }