guys, good day!

I just want to ask how to reload/refresh a JComboBox. I have a cardlayout with 3 panels, each panel has its own combobox. what I want to do is to reload the combobox to its original state each time I swap the cardlayout.

updateUI();
repaint();
revalidate();

I did try to use these classes but failed.

use ComboBoxModel

use ComboBoxModel

can you show a simple example? thanks

Problem Solve... Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.