package process; import javax.swing. * ; import javax.swing.table. * ; import java.sql. * ; /** * This class create JTable from Database table. * User program needs to specify database connection and corresponding atable name. * @author Hemraj */ public class TableToJTable { //private String table; private Connection con; public TableToJTable ( Connection con ){ this .con = con; } /** * This method return JTable object created from Database table having same data asn structure * as in original table into database. * @param table Name of the database table to be coverted to JTable * @return JTable object that consist of data and structure of Database table * @throws java.lang.Exception Original object is deferent, e.i either SQLException or NullPointerException */ public JTable getTable ( String table ) throws Exception { JTable t1 = new JTable () ; D
Future driven solutions.