• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java MVC ActionListener NullPointerException

 
Mark Calen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

The View


The Controller


Main

 
m Korbel
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please whats wrong with answers on another question, another place
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic