MenuItem inside/Sub of another MenuItem in Java?
Domanda
How to add a menuItem
inside/sub of another menuItem
in Java? is it possible ?
Soluzione
Try the following
submenu1 = new JMenu("my submenu");
JMenuItem menuItem1 = new JMenuItem("submenu items");
submenu1.add(menuItem1);
menuItem1 = new JMenuItem("item1");
submenu1.add(menuItem1);
Refer to this example for more details.
Altri suggerimenti
Add JMenu
instead of the first JMenuItem
.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow