hi everyone. i'm trying to develop a little application in which there's a JComboBox that is initialized at start with some elements, retrieved from db: these data are inserted in object, object in a LinkedList, and from this a String array is retrieved to populate the JComboBox. I've added a button that, once clicked, open a JOptionPane in which new data can be added, after that elements are written on db, and the JOptionPane quit. After that, the Linked List above is refreshed, retrieving data from db including new data, and the same procedure of start is repeated for populating JComboBox, but new elements (or also removed elements) are not showed. what can i do?
Darryl Burke wrote:Hello Lily and welcome to the Ranch!
Do you have a problem, and a more specific question, that we can help you with? If it's not directly about adding items to a JComboBox at runtime, then start a new thread.
I'm encountering similar problems that's why I'm asking Luke since he solved it
New data are added into the database from a text field.
My combo box does not display the new data unless i terminate and execute the application again.