how-to

Window (swing) applications

How to clear all items from JComboBox

For clear all items from javax.swing.JComboBox use method javax.swing.JComboBox.removeAllItems().

/* -- clear all items from combobox */

jComboBox1.removeAllItems();