I have a Java program with a model and a GUI. On my Frame (that implements Observer
) I have put a jcombobox with a list of registration from my model (that extends Observable
).
When I click on a button add registration the list in my model changed. And than I do
setChanged();
notifyObservers();
In my update method I want to make change the values of the jcombobox. I tried with a repaint()
or something like that, but my combobox doesn't change. I am sure I go to my update method, but I don't know how I have to change the jcombobox.
Can someone help