• Post Reply Bookmark Topic Watch Topic
  • New Topic

abt JTable value's Look

 
kirtesh jain
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
i have ont Table in which at one column one value i wnat to be shown in BOLD face so what can be done for that???please help me out..
thank you...
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out DefaultTableCellRenderer in combination with TableColumn. You will need to override DefaultTableCellRenderer, and do some coding in its getTableCellRendererComponent method based on the value:
 
kirtesh jain
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You for reply..
actually sir i need only at a single place in whole table and i am inserting inot hte column using vectors means my data is stored in vector and while displaying i just displaying them so only at one lace i need...
what you hav suggested will work that or any other alternative???
thank you..
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure it will. For the column in which that value is stored set your custom renderer, and just make "needsBold" return true only for that one value.
 
kirtesh jain
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sir its working fine...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!