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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JTable Problem

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.
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
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic