java.lang.IllegalStateException when updating JComboBox with setModel()?
I was trying to updating JComboBox with setModel(). However, it throws a java.lang.IllegalStateException. Specifically, I used a JTextField to point to the Editable component of the JComboBox, and Update the JComboBox every time the JTextField recieves a new input. Can anyone tell me the reason? package ui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import javax.swing.DefaultComboBoxModel; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.JToolBar; import javax.swing.event