Hi, I'm having some trouble trying to get my JComboBox working properly... Basically, I have a JMenuBar with several options, and depending on what the user chooses from that menu, a combo box will be populated with a different
string of options. So for example, I have 2 JMenu items: "Cars" and "Animals." Clicking on the "Cars" option will populate a JComboBox with 3 options: "Chevy", "Ford", "Hyundai". Clicking on "Animals" will populate it with "Cat", "Dog", "Bird", "Fish".
How would that be done? I was looking for an example of using the ABstractListModel
ant DefaultcomboBoxModel to do this but I couldn't find a whole lot on Google or on the Sun website and I'm not sure where to start. Any help would be great!