aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes JTable prevent editing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "JTable prevent editing" Watch "JTable prevent editing" New topic
Author

JTable prevent editing

fadi mujahid
Greenhorn

Joined: Oct 14, 2002
Posts: 28
Hello
When I double click on a cell in my table, I can edit the data of that cell. Is there a way to prevent this?
Thanks
Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hi,
yes, you can prevent the editing.
The TableModel interface declares a method "public boolean isCellEditable (int row, int col)". You can implement this method, and let it always return false:

Hope this helps.


Mag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable prevent editing
 
Similar Threads
how to prevent cell editing of a partyicular cell in a jtable
JTable's cells getting bunched up when I scroll
JTable Cell is in editing mode when pressing key with contorl buttons . . .
set JTable cannot be edit..
Problem with a JTable