Hello guys. I've been tearing my hair out the past few hours trying to solve this problem. Every time I click on a JButton which should open a JFrame(And it does), i get a stacktrace saying I have a null point exception at these bits of code:
In class A i have:
aButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
B instanceofB = new B(userSession.getBalance());
}
});
and Class B
super.getSomeBtn().setVisible(false);
This is where the stacktrace says the errors are in the two above sections. I have a line exactly the same as the one above in Class B and it works fine?
Really stuck here!