After reading two chapters i am clueless as to where the actionPerformed method should go, in one book i see it in a private inner class, inside a public class(which creates a frame). In the other book i see it right after the listener is registered using @override. Hopefully i am clear enough, otherwise i can give examples.
i one one book i see:
button.addActionListener(new ActionListner(){
@override
public void actionPerformed(ActionEvent e){
//code
//
}
});
----------------------------------------
in the other:
button.addActionListener(new CalcButtonListen())
//
//
//then at the end of the class, a private class is created
private class CalcButtonListen implements ActionLIstener{
public void actionPerformed(ActionEvent e){
//code
//
}
}