File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes how to make Jtable Cells  non Editable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "how to make Jtable Cells  non Editable" Watch "how to make Jtable Cells  non Editable" New topic
Author

how to make Jtable Cells non Editable

Chandu onwards
Greenhorn

Joined: Dec 23, 2002
Posts: 13
How to make JTable Cells non Editable.
I'm pretty new to new GUI coding, plse help me!!
Thanks,
chandu.
Chandu onwards
Greenhorn

Joined: Dec 23, 2002
Posts: 13
i could get the answer from this URL
http://www.coderanch.com/t/330120/GUI/java/make-JTable-as-Non-Editable
Mudunuri Raju
Ranch Hand

Joined: Dec 15, 2002
Posts: 44
See this code. It means the 1st column in the JTable is editable(true). All other all non editable(false). If you want all are non editable
simply return false. Hope you understand this now.
public boolean isCellEditable(int row, int col) {
if (col == 0) {
return true;
} else {
return false;
}
}


Srini.
Jawad Kakar
Ranch Hand

Joined: Oct 06, 2002
Posts: 82
This is how I did, I made the first col editable and rest not editable. I have a checkbox and a text field in first col. for booking flight(s).
Thank you
Jawad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to make Jtable Cells non Editable