posted 17 years ago
I have a two dimensional array of jpanels arranged on a jframe. There are a lot of panels, so they are added to the array in a for loop. As they are added, each is assigned a mouseListener. When clicked, each JPanel is SUPPOSED to print out its unique ID number (assigned in the for loop).
I can't figure out how to make the mouseListener access its component to get the ID. The components are dynamic, and not static...
Here is what I have...
Thanks in advance