> Hi,
>
[quoted text clipped - 3 lines]
> buttons. For example, a button name btnP0x0 and another named btnP0x1
> etc.
Why not create a 10x10 array to hold the pointers to the buttons? The
Object that btnArray[0][1] would point to would be the button at that
grid location.
> When the buttons are pressed I want to pass integers x and y to a
> method. This method is going to a bunch of things with these numbers
> but one thing i would like to do would be to change the color of the
> button corresponding to this.
Each button can be its own listener and change its own color by waiting
for the Action Event to be generated when a user clicks it. By doing it
that way you don't need to know what the x and y values are. Each button
changes itself and would implicitly know what to change.
> How can I pass the variables x and y into another variable name? is
> this possible? something along the lines of:
>
> btnP + varX + x + varY. bgcolor = red.
I personally don't understand what the above line is supposed to do.
> Thanks for any suggestions. I am HOPING that I do not have to pass
> the button object into the function since I will have to change a
> bunch of code for these buttons.
>
> Thanks.
hope that helps