• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cell border colouring  RSS feed

 
hamlin stephen
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How we can paint the cell border in a JTable?
please help.
thanx in advance.
[ February 01, 2006: Message edited by: hamlin stephen ]
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you just use the setGridColor(Color gridColor)
 
hamlin stephen
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mathias,
I tried it but the issue is I need to color only the cell which is on focus,not the entire row.Any solution.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
hamlin stephen
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeff It worked fine..
but one issue is there ,I n one cell i've JCheckBox nested
there it is not colouring the border,
I tried with
jcheckBoxOb.setBorder(BorderFactory.createLineBorder(Color.BLACK,1));

But still no effect...
Any soln

thanx in advance...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!