1. valueChanged can't throw SQLException?? coderanch.com |
2. Unreported exception java.sql.SQLException java-forums.orgJDBCTableModel tablemodel; Connection dbConnect; try { ConnectionJDBC cj4 = new ConnectionJDBC(); dbConnect= cj4.makeConnection(); ///create the third new class see the excerpt code below. String tableCode = "Module"; tablemodel = new JDBCTableModel(dbConnect,tableCode); JTable jtable = new JTable(tablemodel); } catch ( SQLException sqlex ) { // process SQLExceptions here sqlex.printStackTrace(); System.out.println("Connection unsuccessful\n" +sqlex.toString() ); } int c= jtable.getColumnCount(); ////[COLOR="Red"]Unrecognized variable jtable[/COLOR] int r ... |