0
How can I display a list of data taken from a database graphically with java (jdbc)?
hello community, someone would know how I can do to display in the form of a list of data that I extracted from a mysql database with java (jdbc). For example here are lines of code which allows to extract a data : Statement state=con.createStatement(); String rq="select name from table"; state.execute(rq); I am designing an application with a graphical interface. with the lines of code above, we can see that the connection to the database works and that the query gives a result on the terminal. But if I want to build a list with the data taken from the database and display it graphically, how can I?
3 Respuestas
0
the code above was missing lines of code:
ResultSet rs=state.exexuteQuery(rq);
While(rs.next()){
String h=rs.getString(1);
}
0
And i display h with :
System.out.println(h);
to see that the connection is working!.
It's okay on the terminal but how can i create a list with these data and display them graphically?
0
FF9900 thanks