I am working on a java application that reads a file template.ods, and fills it in with an array of Objects using JopenDocument. Based on the JopenDocument documentation, I should get the TableModel from the Sheet, and then use the method setValueAt(value, rowIndex, columnIndex) to modify it, but once I do that, an IndexOutofBoundsException is triggered, Here is my method:
Tag: tablemodel
Java JTable getting the data of the selected row
Are there any methods that are used to get the data of the selected row? I just want to simply click a specific row with data on it and click a button that will print the data in the Console. Answer http://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html You will find these methods in it: Use a mix of these to achieve your result.
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` Answer Variable names should NOT start with an upper case character. SongData_Table should be songDataTable. Override the isCellEditable(…) method of the JTable, instead of the TableModel.