×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: Java
Posted by: Minh Pham
Added: Oct 18, 2015 5:49 PM
Modified: Oct 18, 2015 5:50 PM
Views: 8
Tags: combobox
Display when comboBox's State Change
  1. String sqlClsas = "";
  2. String columnName = "";
  3. st = conn.createStatement();
  4. rs = st.executeQuery(sqlClsas);
  5. Vector combobox = new Vector();
  6. while(rs.next()){
  7.     String str = rs.getString(columnName);
  8.     combobox.add(str);
  9. }
  10. jComboBox.setModel(df_cbb);