How to obtain the name of the JMenuItem?
Hi there!
I need some help, how do I get the name of the JMenuItem that the user pressed? I've got some JMenuItems all use the same class "catalogue":
iCatalogue = new JMenuItem(subcatalogo);
iCatalogue1 = new JMenuItem(subcatalogo);
But they are used on different JMenu:
mCustomer.add(iCatalogue);
mBill.add(iCatalogue1);
When I click on Catalogue (the submenu inside of both customer and bill) appears a new JFrame where I put some JButtons: Insert, Update... I need that when the user clicks on Insert (for instance) I need to know the name of the JMenu (if it was Customer or Bill) where the user clicked on
In other words, I need to know the name of the JMenu where the JMenuItem was in. How can I do that?
Since now, thanks for the help!