JTable will set to editable after converting ResultSet to TableModel with DbUtils. How to make it non-editable again?
问题 Here is My Code for doing this` public static void addSong(String[] fileDetail, JTable SongData_Table) { try { con = DBConnection.getCon(); stmt = con.createStatement(); stmt.executeUpdate("insert into songs values (null,'" + fileDetail[0] + "', '" + fileDetail[1] + "',null,null)"); ResultSet rs = stmt.executeQuery("select * from songs"); TableModel model = DbUtils.resultSetToTableModel(rs); SongData_Table.setModel(model); if (con != null) { stmt.close(); con.close(); } } catch (SQLException