• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java MVC ActionListener NullPointerException

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please whats wrong with answers on another question, another place
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic