Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to retrieve data from database table and display all data into JTable swing java
Posted

Write some code. This question is far too broad to be answered in a Quick Answers forum. Take a look at the GUI tutorial[^] and the database tutorial[^].
 
Share this answer
 
write below code in constructor
C#
DefaultTableModel model;
model = new DefaultTableModel(null,col);

        jTable1.setModel(model);

        int l2 = jTable1.getRowCount();
        while(l2>=1)
        {
            model.removeRow(0);
            l2 = l2-1;
        }

and after retrieving values from database
C#
String data[]={value1,value2};
model.addRow(data);
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900