How do i disable the editing of row in a table? i saw this property "editing row" which by default is "-1".. i changed it to 0 and still doesn't work, I really dont know what "-1" means... how do i disable editing of row? and enabling the sorting too?

Recommended Answers

All 2 Replies

Take a look at this example on disallowing edits: http://exampledepot.com/egs/javax.swing.table/NoEdit.html
The signature of the method that they are overriding should give you a pretty good idea on how to disallow editing on any particular row or column.

I believe this statement allows the table to be sorted by clicking on a title:

[I]tableName[/I].setAutoCreateRowSorter(true);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.