wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Colors in JTable - unexpected result when scrolling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Colors in JTable - unexpected result when scrolling" Watch "Colors in JTable - unexpected result when scrolling" New topic
Author

Colors in JTable - unexpected result when scrolling

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
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

Joined: Dec 12, 2002
Posts: 580
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

Joined: Sep 10, 2004
Posts: 755


I'm using the simple SWING.
Thanks
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
and...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Colors in JTable - unexpected result when scrolling
 
Similar Threads
JTable problem
jtable
JTable problem
order by date_arrive but what if...
JTable