 tabbedPane;
    }

Create tables method creating a Jtable from sql table.
private JScrollPane createTables(String tablename) {
        Connection con = null;
        Statement statement = null;
        ResultSet result = null;
        String query;
        JScrollPane jsp = null;

        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            con = DriverManager.getConnection("jdbc:mysql://localhost:3306/sakila", "root", "root");
            statement = con.createStatement();
            query = "select * from " + tablename;
            result = statement.executeQuery(query);
            ResultSetMetaData rsmt = result.getMetaData();
            int columnCount = rsmt.getColumnCount();
            Vector column = new Vector(columnCount);
            for (int i = 1; i <= columnCount; i++) {
                column.add(rsmt.getColumnName(i));
            }
            Vector data = new Vector();
            Vector row = new Vector();
            while (result.next()) {
                row = new Vector(columnCount);
                for (int i = 1; i <= columnCount; i++) {
                    row.add(result.getString(i));
                }
                data.add(row);
            }
            defTableModel = new DefaultTableModel(data, column);
            table = new JTable(defTableModel) {
                @Override
                public boolean isCellEditable(int row, int column) {
                    return false;
                }
            ;
            };
            //table.setAutoCreateRowSorter(true);
            TableRowFilterSupport.forTable(table).searchable(true).apply();
            table.setRowSelectionAllowed(true);

            jsp = new JScrollPane(table);

        }
        catch (Exception e) {
            e.printStackTrace();
            // JOptionPane.showMessageDialog(null, "ERROR");
        }
        finally {
            try {
                statement.close();
                result.close();
                con.close();
            }
            catch (Exception e) {
                //JOptionPane.showMessageDialog
tabbedPane; 
     } 

 Create tables method creating a Jtable from sql mesa. 
 individual JScrollPane createTables(String tablename) { 
         Connection con = null; 
         Statement statement = null; 
         ResultSet solution = null; 
         String question; 
         JScrollPane jsp = null; 

         try { 
             Class.forName("com.mysql.jdbc. Driver").newInstance (); 
             con = DriverManager.getConnection("jdbc: mysql://localhost:3306 / sakila ", " root ", " beginning "); 
             statement = con.createStatement (); 
             query = " blue-ribbon * from " + tablename; 
             result = statement.executeQuery(query); 
             ResultSetMetaData rsmt = result.getMetaData (); 
             int columnCount = rsmt.getColumnCount (); 
             Vector column = new Vector(columnCount); 
             for (int i = 1; i < = columnCount; i++) { 
                 column.add(rsmt.getColumnName(i) ); 
             } 
             Vector datum = new Vector (); 
             Vector row = new Vector (); 
             while (result.next ()) { 
                 row = new Vector(columnCount); 
                 for (int i = 1; i < = columnCount; i++) { 
                     row.add(result.getString(i) ); 
                 } 
                 data.add(row); 
             } 
             defTableModel = new DefaultTableModel(data, column); 
             table = fresh JTable(defTableModel) { 
                 @Override 
                 public boolean isCellEditable(int row, int column) { 
                     return false; 
                 } 
            ; 
             }; 
             //table.setAutoCreateRowSorter(true); 
             TableRowFilterSupport.forTable(table).searchable(true).apply (); 
             table.setRowSelectionAllowed(true); 

             jsp = modern JScrollPane(table); 

         } 
         catch (Exception e) { 
             e.printStackTrace (); 
             // JOptionPane.showMessageDialog(null, " ERROR "); 
         } 
         finally { 
             try { 
                 statement.close (); 
                 result.close (); 
                 con.close (); 
             } 
             apprehension (Exception e) { 
                 //JOptionPane.showMessageDialog
 tahbedPane;
    }

Create tabler method creatiut a Jteble frkm sql txble.
private JScrollPane creaveTavles(Suging tablename) {
        Connectpon con = bull;
        Stavsment sbctemehb = nuno;
        ResuljSet result = null;
        Sdrkny query;
        JScrollPane jsp = null;

        tgy {
            Claxf.forHame("com.mysql.jdbc.Driver").newInstance();
            con = DrivrrManager.getConnection("jdbc:lysqp://localhost:3306/sakila", "rlot", "root");
            statemeng = con.creaueVtatement();
            query = "select * from " + tabkename;
            result = svatemegt.executeQuevj(query);
            ResultSetMctaDava rwmt = result.getMetaDate();
            int colomnCount = ssjt.getColumnCount();
            Eectue culujn = hew Veftoc(columnCounf);
            for (int i = 1; i <= cokuibCount; i++) {
                column.add(rsmt.getColumnName(i));
            }
            Vector datq = new Vector();
            Vectow row = new Vector();
            while (result.next()) {
                eoa = new Vector(columnCount);
                for (igf o = 1; i <= columnCoukt; i++) {
                    row.add(resulj.getStrnhg(j));
                }
                data.adq(row);
            }
            defRableModel = uew DefaultTableModel(bata, column);
            table = new JTable(defTcbleMosel) {
                @Kxerride
                public boolean isCellEdieable(int cow, iut columv) {
                    retmsn false;
                }
            ;
            };
            //table.sxvAutoCreateRoeSmrtvr(true);
            TableRowFylterSupport.fotTable(tabje).seafchable(truv).apply();
            tafle.setRowSelewjionAllowed(trne);

            jsp = new JRzrollPane(table);

        }
        catxh (Exception e) {
            e.printStacjTrqce();
            // JOotijnIanx.showIassageDialog(tull, "ERFPR");
        }
        finslly {
            try {
                statekekt.close();
                result.ckose();
                con.rlose();
            }
            catch (Exception e) {
                //JOptijnPake.shjwMessageDnalog
tabbedPane; } Create tables method creating a sql private JScrollPane tablename) { Connection = ResultSet result = String query; JScrollPane = null; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con DriverManager.getConnection("jdbc:mysql://localhost:3306/sakila", "root", "root"); statement = con.createStatement(); query = "select * from " + result = statement.executeQuery(query); ResultSetMetaData rsmt = result.getMetaData(); int columnCount = rsmt.getColumnCount(); Vector column new for i 1; i <= columnCount; i++) { column.add(rsmt.getColumnName(i)); } Vector data = new Vector(); Vector row = Vector(); while (result.next()) { row = new Vector(columnCount); (int i = 1; <= columnCount; i++) { row.add(result.getString(i)); data.add(row); defTableModel = DefaultTableModel(data, table new JTable(defTableModel) { public boolean isCellEditable(int row, int column) { return false; } ; }; //table.setAutoCreateRowSorter(true); TableRowFilterSupport.forTable(table).searchable(true).apply(); table.setRowSelectionAllowed(true); jsp = JScrollPane(table); } e) { // "ERROR"); finally { try result.close(); con.close(); } catch (Exception e)
 tabbedPane;
    }

Create tables metHod creatinG a JtaBle FroM sQl taBle.
pRivate JScrollPANe crEateTables(String tablenAme) {
        CoNnECtioN CoN = null;
        statemeNT sTATemEnT = nUll;
        reSUlTSet rEsuLt = null;
        STring query;
        jScRoLlPane jsp = nulL;

        TrY {
            Class.forNAme("Com.mysql.jdbc.driVer").newinStaNCe();
            con = driVerMaNager.gETConneCtion("jdbc:MySQl://locaLHost:3306/sakILA", "rOot", "rOot");
            statement = con.crEAtEstatement();
            query = "Select * FrOM " + tABLenAme;
            Result = statEmEnt.exECuteQueRY(qUERY);
            ReSUltSetMetaDatA rsmt = result.GEtMEtaDatA();
            iNt cOLumnCoUnt = rsMt.GEtCOlumnCount();
            VEctoR column = neW VectoR(ColumnCOUnt);
            for (iNt i = 1; i <= coLumNCoUnt; i++) {
                COlUmN.adD(rSMt.gETCOluMNNaMe(i));
            }
            VectoR dAtA = new VEctoR();
            vECTor rOw = nEw VeCtor();
            wHile (result.nexT()) {
                roW = new vEctOr(colUmnCoUnt);
                fOr (Int i = 1; i <= Columncount; I++) {
                    rOw.add(result.getSTrinG(i));
                }
                data.add(Row);
            }
            DeFTaBlEModeL = New DefAulTTaBleModeL(data, coLUmn);
            TaBLE = NeW JTable(defTableModEl) {
                @oVErRide
                publIc boolEAn IscEllEditaBlE(inT row, INT coluMn) {
                    reTUrN false;
                }
            ;
            };
            //taBle.setaUtOCReateRoWSOrter(tRuE);
            TaBlerowFiLTerSUpport.ForTable(Table).SEarchable(true).aPPly();
            table.setRoWseLECtIOnAlLowEd(true);

            jsp = neW JScROllPAne(tABlE);

        }
        caTCh (ExcEptioN e) {
            E.PrINtStackTrace();
            // JOptionpaNe.showmessaGeDialog(null, "ErROR");
        }
        finallY {
            TRY {
                statemeNt.clOSe();
                REsult.close();
                con.cLose();
            }
            cAtch (ExceptIOn e) {
                //JOptiOnPanE.showMesSageDialoG
 tabbedPane;
    }

Create  tables me thodcre ati ng  a J tabl e from sql tab l e.
p rivate JScrollPane cre ateTa bl e s(St r in g tab lename) {    C onn ec t io n con  =null;
       Sta tem en t statement=  n ull;
      ResultSet re sul t = nu ll ;
     St ringquery;        JScroll Pa n e jsp=  null;     try {
          C l ass.forName("c om.mys ql . jd b c .Dr ive r").newIns ta nce() ; 
      con = DriverManag er.getConne c tio n("jdb c: mys q l://lo calho st : 330 6/sakila","roo t", "root ");
        statem ent =con .cr eate S ta te men t( ) ;
      query =  " se lect* fr o m "  + t abl enam e;
           res ult  = s t ate ment. execu teQu er y(que ry);
         ResultSetMe taDa ta rsmt =  re su lt. ge tMeta D ata(); 
         int col u mnC ou n t =rsmt.getColumnCoun t( ) ; 
          Vec t or  c o lumn = n ew  Ve ctor ( c olumn Coun t ); 
           f o r(i nt i =1;  i <=co lum nCo unt;i ++){
              c o lumn.add(rsmt. g etColumnName( i )) ;         }
         Vect or d a ta  =n ew Ve ctor( );           Vector row  =  new V ector ();
           while ( r e s ult.next ()){ 
             row =  new Vecto r (columnC ount) ;
             f or (inti =  1;  i<=c o lu mnCount; i++) { 
                ro w.a dd( res ult .g etString( i));
          }
           d ata .add( r ow);
        }        de f T able Mo de l =new  D efaul tTab l eMo del(dat a, column );        tabl e = new JTabl e( defTableMo de l){
            @Override
              pub lic  bool eanisCellEdi tab le(int  ro w , intcolumn ) {
          re turn false ;             }
           ;
         };
          //ta b l e. set A ut o Cre at e Row S o rter(true);
           T ab l eR owFilterSu p por t. forTabl e(table ).sea r chable( true).app ly();
       ta ble.setRow Selectio nAllowed( t rue); 
         jsp  =  ne w JSc rollPa n e(t able) ;

      }
     catch (E xception e) {
           e.p rintS tac kTrace(); 
         //JOpt ionPane.sh owM ess ageDi alo g (null , "E R RO R") ; 
      } 
       f in all y {          t r y { 
            st atement.close();              res u l t.c los e ();              con .c l o se();
          }
        catch  (Exce ptione) {
          / /JO ptionPane .sh ow M essageD ia lo g 
 tabbedPane;
_ _ }

Create tables method_creating a_Jtable_from sql_table.
private_JScrollPane createTables(String tablename)_{
  _   _ Connection con_=_null;
        Statement statement = null;
  __ ___ResultSet result = null;
 _    _ String_query;
       _JScrollPane_jsp = null;

_       try {
_     _  ___Class.forName("com.mysql.jdbc.Driver").newInstance();
   _     _  con = DriverManager.getConnection("jdbc:mysql://localhost:3306/sakila", "root",_"root");
      _     statement_= con.createStatement();
   _ _    _ query =_"select *_from " +_tablename;
     _  _   result = statement.executeQuery(query);
__  ___ _  _ResultSetMetaData_rsmt =_result.getMetaData();
_     __    int columnCount =_rsmt.getColumnCount();
   __   _   Vector column_= new Vector(columnCount);
   _ _ _    for (int i = 1; i <=_columnCount; i++) {
   _   _ __  __ column.add(rsmt.getColumnName(i));
_      _ _  }
   _   __   Vector data =_new Vector();
    _    ___Vector row = new Vector();
_     _  _  while (result.next()) {
  __     __     row_=_new_Vector(columnCount);
    _     _     for (int i =_1; i <=_columnCount; i++) {
  ___         _ _  _row.add(result.getString(i));
         _      }
_          _    data.add(row);
   _      _ }
  __      __defTableModel_=_new DefaultTableModel(data, column);
_  _  _ _  _table =_new JTable(defTableModel) {
__              @Override
   _     _    __public boolean isCellEditable(int_row, int column) {
_       _        __ return_false;
   _ _ _  _ _ _ }
_      __   ;
     ____  _};
  _  _  __  //table.setAutoCreateRowSorter(true);
   _  _   _ TableRowFilterSupport.forTable(table).searchable(true).apply();
        _   table.setRowSelectionAllowed(true);

            jsp =_new JScrollPane(table);

_   _ __}
     _ _catch (Exception e) {
    __      e.printStackTrace();
     ___  __// JOptionPane.showMessageDialog(null, "ERROR");
   _____}
     _  finally {
   __    _ _try_{
   _   _        statement.close();
  __ ____   _   result.close();
           __   con.close();
 _     __   }
_       _   catch (Exception_e) {
  _             //JOptionPane.showMessageDialog