Variable JMenubars
I've got a JMenuBar that I want to populate with JMenuItems taken from a variable array, say [20, 30, 50, 70] (these values change every time though). This is fine, I've managed to do that with no problems.
Now I want to add an ActionListener to each of these JMenuItems that will take the number that's printed on the JMenuItem and deliver it somewhere else when it's clicked.
I've been searching the documentation to find a method to do this and I can't. I can't use getText() because I haven't given specific names to the JMenuItems, they're generated anonmously in a for loop.
Please help!

