I have got an array of 30 buttons []. I have a variable buttonClicked. When I press the button how can I get the index and store the index number in the buttonClicked?
The prettiest way is using Component.setName. Then you don't even need to maintain variables with your components - you can go straight off of the name