I'm writing a program for my school assignment using CardLayout() but I keep getting a null pointer error but I can't figure out why. Can someone please point out the error in my code. The code is incomplete but applet opens and displays buttons but not the card.
The error I get is when I press the Input button (so it's in the ActionListener):
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at BookCentre.actionPerformed(BookCentre.java:162)
//removed code since assignment is due in a week.