This looks like buttonpressed is an array of int.
Do you know know what the value returned by getID is?
Read the API doc for the event class to see if it is useful for your program.
Type: Posts; User: Norm
This looks like buttonpressed is an array of int.
Do you know know what the value returned by getID is?
Read the API doc for the event class to see if it is useful for your program.
Try the action listener
Some buttons can get the focus which means you can use the tab and press Enter to get an action event.
You can get the label from the button that was pressed. Look at the API doc for the button class for what method to use.
Then you can store the number in the array.
What do you need to store in the array?
The JComponent class has ClientProperty methods you can use to store information in each button itself.