Question

I'm about to create a menu box which will have more sections for ex. (avatar pictures, coupons and more stuff) but i don't really know how do i can do that, i have taken a picture to show you what i'm saying ( http://prntscr.com/3dodfw ). The red marker is where i want the menu to be so when i will choose a section in the combo box the items in the menu to be changed. If somebody can explain me or show me how i can do that i will appreciate it very much.

Was it helpful?

Solution

In the red area you can add a JPanel with CardLyout and put your different "stuff" on different cards. See How to Use CardLayout. To switch between the cards add an ActionListener or ItemListener to your JComboBox. See Handling Events on a Combo Box.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top