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

5th Nov 2016, 9:43 AM
JauJau
JauJau - avatar
2 Answers
+ 1
load the database into a 2d array, and pass the array to a JTable
25th Dec 2016, 6:21 AM
Gabe Rust
Gabe Rust - avatar
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 .
21st Apr 2017, 2:27 AM
Yash Tiwari
Yash Tiwari - avatar