In Netbeans I'm using a JTable to display data from a db table. How can I bind the JTable to the results of a query (resultset)?
Here is how I create the recordset:
Code :String host = "jdbc:derby://localhost:1527/TownHall"; String uName = "test"; String uPass= "111"; try{ Connection con = DriverManager.getConnection( host, uName, uPass ); Statement stmt = con.createStatement( ); String SQL = "SELECT * FROM TAXES"; ResultSet rs = stmt.executeQuery( SQL );
