> am i doing in wrong way?
can't see execute(), but I've just noticed something in trying to see a better way.
when you say it's not working (using db), are you getting multiple entries each time you save/load the names?
if that's the problem, it's because of reading the db names into
ArrayList<
String> resultSetList = new ArrayList<String>();
and not clearing the arrayList's contents before reloading the student names
e.g.
your program opens and loads 10 students into 'resultSetList' (which end up displayed in the comboBox)
now you add 1 student, so, added to 'resultSetList' in loadStudents() is 11 more names, so the comboBox will have 21 names
add another and the comboBox will now have 21 + 12 names etc
if the problem is not the above, can you explain how it's not working.