Hi!
I have a JTable calles "table" and I want to fill it with items stored in database. I have set up a connection and the only thing I have to do now is to fill the JTable.
But I don´t know how to that.
String search_str = searchTextField.getText();
String query;
ResultSet rs;
Statement stmt;
query = "SELECT name FROM person WHERE name='"+search_str+"'";
stmt = Connect.con.createStatement();
rs = stmt.executeQuery(query);
while(rs.next())
{
System.out.println(rs.getString("name"));
}