I am writing this program using the javax.swing library. The "purpose" of the program is that when you push button one the text of the label says button1 if you push button 2 the text of the label says button 2
right.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
label.setText("right") }
});
for some reason this creates a null pointer exception. I really don't get this. Can you guys help me?
Kind regards