Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

an array of jButtons

807598Feb 15 2006 — edited May 10 2009
Hi!

I have an array loaded with my jButtons (100 count).

I programmatically call for this array to change the button's color ... this works well.
button.setBackground(new Color(a,b,c));
now ... what I want to do now , is when I mouse click on any of these buttons ... to have it report its jButton number as a new var.. (they range from 1 to 100)

Can this be done?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2009
Added on Feb 15 2006
27 comments
819 views