I get the Jtable but no data [duplicate]
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: I can’t get my JTable to show anything I can show my Table but I can't get any data in the table, just the column name. My code looks like this. public static DefaultTableModel buildTableModel(ResultSet rs) throws SQLException { java.sql.ResultSetMetaData metaData = rs.getMetaData(); // names of columns Vector<String> columnNames = new Vector<String>(); int columnCount = metaData.getColumnCount(); for (int