Hello,
first, sorry for my bad english. I am beginner in Java. I try to make application to connect to MYSQL database and write data in it and also get some queries from it . I succeseded to write data in it,also to get some SELECT queries. For example, I have table named Proba with just three columns,for testing(ID, ime(name), prezime(surname)) . I succeseded to get SELECT * FROM Proba result in Jlist and in Combobox but I can not to get it in Jtable. I also got "select * from proba where ime like '%" + something + "%' "; query where I want to find names which contains some group of letters. I got it also in Jlist and combobox but not in table. My question is how can I write code to fill table with data from database.
My second question is how to connect jasper report with netbeans.
P.S. I got all data from table (like SELECT * FROM Proba) but I can not get data with WHERE clause. This is method for fill list and combobox with data.

public void SellectAll(Object oCombo, Object Lista) {
int status = 0;

try {
String rezultat;
String query = "SELECT * FROM proba";
Statement stmt = con.createStatement();
ResultSet rs = (ResultSet) stmt.executeQuery(query);

DefaultListModel model = new DefaultListModel();
while (rs.next()) {
rezultat = rs.getString("ime") + " " + rs.getString("prezime");
model.addElement(rezultat); // model za listu
((JComboBox) oCombo).addItem(rezultat); //combo

}
((JList) Lista).setModel(model);

} catch (SQLException e) {
e.getMessage();
}
}

public void SelectPoKriterijumu(Object oCombo, Object Lista, String pretr) {
int status = 0;

try {
String rezultat = "";
String query = "select * from proba where ime like '%" + pretr + "%' ";
Statement stmt = con.createStatement();
ResultSet rs = (ResultSet) stmt.executeQuery(query);
DefaultListModel model = new DefaultListModel();
while (rs.next()) {
rezultat = rs.getString("ime") + " " + rs.getString("prezime");
model.addElement(rezultat); // model za listu
((JComboBox) oCombo).addItem(rezultat); //combo
}
((JList) Lista).setModel(model);

} catch (SQLException e) {
e.getMessage();
}
}