IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes JTable  Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "JTable  Problem" Watch "JTable  Problem" New topic
Author

JTable Problem

Mahendra Darwatkar
Greenhorn

Joined: Apr 07, 2000
Posts: 20
Hi !!
I am having problem in my applet. I am using one model for two tables. One table is having one column which is non scrollable and other all columns of model.
I am not able to stop cell editing of that one column. Can anybody help me out in this problem.
Mahendra
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
This should have been posted in the Swing\AWT forum.
isCellEditable(int row, int column) from DefaultTableModel is the method you want. Just check the column and return false. But if both tables use this model they both would be set to non-editable. Use a different model.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Mahendra,
I'm going to move this over to the Swing/AWT forum. Applets and Swing are not on the SCJP exam, don't want to confuse people
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
 
subject: JTable Problem
 
Threads others viewed
JTable Problem
JTable Problem
JTable Problem
regarding JDBC,Jtable& Oracle(Urgent..Please)
Problem with a JTable
MyEclipse, The Clear Choice