java - Changing the contents of a JComboBox during runtime -


alright i'm trying create combo box update it's contents during runtime except have no clue how without receiving bunch of errors. there sort of method can use in order accomplish this? example, have vector might start out name in drawers 1 , 2 hi , bye. during runtime program change drawer 1 , 2 eggs, sausage , add third drawer name being computer. how can go changing name on jcombobox during runtime?

you want clear combobox of entries using removeallitems(), re-add items vector using additem().


Comments