0
How to display a database in a jframe form in netbeans ?
Im making a program that will show the monitoring of the data in the database. That will appear in the Jframe. Please help me. Thank you
2 Antworten
+ 1
load the database into a 2d array, and pass the array to a JTable
0
If you have done connecting the db and creating statement
only thing u require is the ResultSet that would help u to access data stored in the db
you can use jlabel to o/p the content simply by
while(rs.next())
JLabelName.setText(rs.getString("Columnname");
i have used getString as an ex . u need to take the type of variable u have set for that particular column
if you have more than one data i would suggest to make an 1D /2D array .
Dont forget to setBounds of these component .