java - Only one row editable on JTable -


I am trying to create a special type of jettbble. I want the whole table not editable by default. But when the user clicks on a line, then clicks on "edit" jbutton, this specific row is editable. And once they search for that row, it is no longer editable.

How would I go about doing this?

To control which cells are editable, you need to extend JTable or JTableModel (See the model call in the example below) to ensure that this method line from JTable is right for all the cells in the row (s) you want to be editable based on your imagination.

  The public boolean is CellEditable (int row, int column) {return getModel (). IsCellEditable (Row, ConvertMulFlmModeel (column)); }  

Take a look at the tableclass editors too.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -