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?
You can find the button in ActionEvent.getSource(). To find the index it is just a matter of iterating through the array, looking for that particular button.