SQLException « Development « Java Swing Q&A





2. Unreported exception java.sql.SQLException    java-forums.org

JDBCTableModel 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 ...