I am developing a Java Swing application that contains JTable . By default, when you start the application for the first time, calling jtable.getSelectedRow() or jtable.getSelectedColumn() returns -1, which means that no row is selected at this point. After the user clicked on any row or column, calling the jtable.getSelectedRow() or jtable.getSelectedColumn() method returns the corresponding values of the selected rows and columns. What I really need is that I want to set the selected row or column to -1, that is, "there is no row or column state." How can i do this?
java select swing jtable
Dinesh
source share