java - What's the appropriate listener for JComboBox for updating itself? -


i have jcombobox it's items updating other parts of program every second. need listener when user tried type there or tried select item jcombobox updates it's content , show new items added. used actionperformed bringing new items user can not select used itemstatechanged program crashed , had close netbeans!

answer: jcombobox on jpanel. best way figure out add listener on jpanel element on jpanel jcombobox clicked update combobox.


my jcombobox on jpanel. best way figure out add listener on jpanel element on jpanel jcombobox clicked update combobox.

events effecting contents of combo box generated model.

try attaching listdatalistener model itself.

if worried being notified when/if model changes, need attach propertychangelistener jcombobox , monitor model property , update data listeners accordingly...


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -