how to show data from database to JTable of Java Swing Controls

iamanapprentice picture iamanapprentice · Jun 17, 2011 · Viewed 48.4k times · Source

I have this problem on how to show data from my database using JTable of Java Swing Controls. I just drag and drop the table from the palette in the JForm.

I have no Idea how to code it.

Answer

arshabh picture arshabh · Jun 17, 2011

you need to connect your java program to your database using a JDBC. after that you need to extract the data using ResultSet class. you need to understand the basics of JDBC and bey clear about the commands of your database. You also need to know how to work with databases through java. so read the online tutorial of java by oracle(official tutorial).it will not take more than a hour. life will be easier