Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JTable Problem

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Yes, my master! Here is the tiny ad you asked for:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic