69 584
Assignments Done
Successfully Done
In February 2019

Answer to Question #62114 in Java | JSP | JSF for Thai Yo

Question #62114
I have a JFrame class TaskPane which contains jPanel2 and addButton. And jPanel2 in its turn contain taskPaneContainer. When we click addButton it adds dynamic Menu to jPanel2, for example Menu 1, Menu 2,... Every Menu consist Item and Delete Button, for example, Menu 1->Item1,Delete; Menu 2->Item2,Delete etc. I would like to ask when I added 3 Menu, i.e. Menu 1 [Item1], Menu 2 [Item2], Menu 3 [Item3], how can I get all actionCommand of Item Button, i.e. 1, 2, 3?
Expert's answer
You need to save al the dynamic menu in an array of this type and in lisener Menu3:

for( int i=0;i<arrayMenu.length;i++)
arrayMenu[i]./*Delete Menu*/;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions