Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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
19
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: 21997
107
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
 
Water! People swim in water! Even tiny ads swim in water:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic