title: ResultSet in JCombobox
body: <p>I want to populate a Jcombobox with sql results but why am I getting an ArrayIndexOufOfBounds here? The JCombobox is like that: <code>countrybox = new JComboBox(countries);</code></p>
  
  <pre><code>    int x = 0;
      String query = "SELECT UNIQUE country FROM criminals ORDER BY country ASC";
      System.out.println(query);
      Statement stmt = connection.createStatement();
      ResultSet rset = stmt.executeQuery(query);
  
      while (rset.next()) {
          countries[x] = rset.getString(1);
          x++;
        }
  </code></pre>