Hello, I'm still new at using MVC and using ActionListener is giving me an issue running the program in which case where the NullPointerException comes as output.
The aim is to have a back button which returns the user from the Second Menu to the Main Menu.
When i commented out this line on the Controller the error goes away. this.theView.addComBackButtonListener(new CompanyBackBtnListener());
Correct me if im wrong but i think it can't seem to find the CompanyBackBtnListener even if its there.
- Check for typos already.
- There are actionlisteners for the Main Menu working already. But the Second Menu does not work giving NullPointerException
I tried to narrow down the codings. If i miss any details If you have any solutions please show me how as i'm still learning Java. Thank You.
posted 2 years ago
please whats wrong with answers on another question, another place