I'm looking to create a JComboBox that acts as a menu. For example, when you drop it down, you can select items like you would in a JMenuBar.
So it would take JMenus and JMenuItems as instead of Strings.
Is this possible?
One way to accomplish this would be to create a button that when clicked shows a JPopupmenu, just below the button. The menu would allow the user to select from the menu or submenu. The label/selection of the original button should be changed when a menu item is selected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With