everyone for some reason on execute I am getting null pointer exception, but I cant find reason why, I think its something with setOnAction method but not sure how I can fix it.
In View Part I got
public void addButtonListener(EventHandler<ActionEvent> x)
    {
        login.setOnAction(x);
    }
and in Controller
public Controller(View theView,Model theModel)
    {
        this.theView = theView;
        this.theModel = theModel;
        this.theView.addButtonListener(new SolListener());
    }
inner class in controller:
class SolListener implements EventHandler<ActionEvent>
    {
            @Override
            public void handle(ActionEvent event) 
            {
                String u,p;
                try
                {
                    u = theView.getUsername();
                    p = theView.getPassword();
                    theModel.zhoda(u, p);   
                    theView.Solution(theModel.getSolution());
                }catch (NullPointerException f)
                {
                }
            }
    }
and for some reason I still getting NullPointerException on
public void addButtonListener(EventHandler<ActionEvent> x)
Any ideas ?
 
    