• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Jtable column

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jTable in my frame.i am displaying icons in one column,and chcekbox in another column( new Boolean(FALSE) ).

i want to change only checkbox column in to Boolean(TRUE).

how can i change it.
where can i make changes.
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by ramesh kancherla:

i want to change only checkbox column in to Boolean(TRUE).



The table model holds the data for the table. That is the logical place to make data changes.
Read this for details.
 
Sheriff
Posts: 21775
103
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to change it through code? If so, you can use the setValue method in either the table or the table's model. The difference between the two is that the table's column indexes can be different from the model's column indexes.

Also, please use Boolean.FALSE, Boolean.TRUE and/or Boolean.valueOf(boolean) instead of new Boolean. That will decrease the number of objects created; since there are only two boolean values, these constants will be all that is needed. valueOf will return one of these two.
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!