June 2017
Beginner
1296 pages
69h 23m
English
... setQuery (lines 134–154) performs a query, it stores the number of rows in variable numberOfRows.
ResultSetTableModel Method getValueAtMethod getValueAt (lines 113–131) returns the Object in a particular row and column of the model’s underlying ResultSet. Line 123 uses ResultSet method absolute to position the ResultSet cursor to a specific row. Line 124 uses ResultSet method getObject to obtain the Object in a specific column of the current row. If an exception occurs, the catch in lines 126–128 prints a stack trace and line 130 returns an empty string as the default value.
ResultSetTableModel Method setQueryMethod setQuery (lines 134–154) executes the query it receives as an argument to obtain a new ResultSet (line 143). Line 146 gets ...
Read now
Unlock full access