I am trying to implement an action listener for an array of Jbutton without name. I want the first button to display A, second to display B.... I know that this code displays A which ever button I press. I am unable to come up with any idea please help me.
Did you put that bit about int i = 0; in order to persuade the code to compile? Did you have compiler errors about "must be declared final"? That is because you are trying to go about it in a non-OO fashion. If you followed Rob Camick's suggestion, you would have a field of the button which represents your letter, and you would use that field. There are several alternative fields you might use instead.