0

How can I make it so that every time I choose one option in a JComboBox it changes the options in another JComboBox . Like if I choose meat in JComboBox 1 then it displays all the kinds of meat in JComboBox 2 and if I choose Fruit in JComboBox 1 it displays all the fruit in JComboBox 2 as soon as I select the item in the JComboBox

Dunmol
  • 41
  • 4
  • Are you talking about Java Swing and `JComboBox`? You may want to update your question (as well as your Tags) to add more details and ideally provide a [mre] which demonstrates your problem. – maloomeister Nov 04 '20 at 16:48
  • Check out the answer to [Dynamic JComboBoxes](https://stackoverflow.com/questions/3191837/dynamic-jcomboboxes) – Gilbert Le Blanc Nov 04 '20 at 19:55

0 Answers0