• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Colors in JTable - unexpected result when scrolling

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Looks like I'm having a problem with a JTable.
I have a list of items and they are distinguished by 2 colors (so the end-user can differentiate between them). Anyway, the table colors work ok but when using a JScrollbar the table receives an unexpected result � few of the first items (which are not identical) share the same color.

anyone?

Example of an output (Gil will be colored Green, Dan Yellow, James Green�and so forth)
Gil
Gil
Gil
Dan
Dan
Dan
James
James
James
James
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are you using the standard look & feel? Some non-standard ones have bugs.

if that's not the problem, can you show the renderer code please.

thanks, D.
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm using the simple SWING.
Thanks
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic