Right-click your project libraries in your IDE (NetBeans/Eclipse) and select "Add JAR/Folder," then select the downloaded rs2xml.jar Import the class in your Java code: import net.proteanit.sql.DbUtils; Use in JTable:
// Example: Populate a jTable1 with data from a ResultSet rs jTable1.setModel(DbUtils.resultSetToTableModel(rs)); Use code with caution. Copied to clipboard Stack Overflow: jtable how to use rs2xml Alternative: For Maven Projects download rs2xml.jar google drive
rs2xml.jar contains a single useful class: DBUtils . It provides the static method resultSetToTableModel(ResultSet rs) , which converts a JDBC ResultSet into a TableModel that a JTable can render immediately. download rs2xml.jar google drive
jTable1.setModel(model);