title: Filling a combo box with mysql data
body: <p>hi everyone i have this code but don't know why it doesn't work! </p>
  
  <pre><code>//in database class 
  
  String query = "SELECT group_name FROM customer ORDER BY group_name"; 
  java.sql.PreparedStatement stm = connection.prepareStatement(query); 
  
  rs = stm.executeQuery(query); 
  
  while (rs.next()) { 
  String x = rs.getString("group_name"); 
  System.out.println(x); 
  } 
  
  rs.close(); 
  } 
  
  
  //combo box action 
  
  
  int group = jcombobox.getSelectedIndex(); 
  
  rg_domain rg = new rg_domain(); 
  rg.setGroup(group); 
  rg.setPhone_number(phone_no); 
  
  dbconnection db = new dbconnection(); 
  
  db.broadcastmsgservice_sms(rg); 
  } 
  
  
  //domain class 
   private String group;
  public void setGroup(String group) { 
  this.group = group; 
  } 
  public String getGroup() { 
  return group; 
  } 
  </code></pre>
  
  <p>can anyone help me please..</p>