posted 12 years ago
Hi,
I have a program where users can create records in a Database (there will only be a few of this particular record - under 10). I want to be able to create a menu item for each of these records (already done using a foreach loop), so that I can then open a new JFrame (which contains a table) with all of the information that this record contains. I am having difficulty making the correct item open the JFrame with the correct object parameter. Here is some code to feast your eyes upon:
Inside the ActionListener, I want to instantiate a JFrame that takes a parameter subAccount (located in that ArrayList and again in the Object[]. I know that the Object[] is a bit superfluous at the moment, but it is there because of me playing with possible ideas.
So, the quesiton is, how can I access the correct object from within the listener?
Thanks in advance,
Greg