Solved

jtable change row color

Posted on 2006-11-07
1
580 Views
Last Modified: 2008-02-01
I have a jtable and a button a dialog.  the number of rows in the table is different every time the application is run.  What i want to do is, when the button is clicked it runs a process and completes.  when it finishes and a boolean is set true (if false do nothing) then i want to see which row is selected and change every row 's background to red that comes after the selected row.

So far I see no easy way to change the background of individual rows in a jtable so i'm assuming i'll need to use a renderer of sorts.  Does anyone know how i can achieve this?
0
Comment
Question by:tbboyett
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 17892820
heres an example of that sort of thing

http://www.objects.com.au/java/examples/swing/ColoredTableCell.do

u can probably simplify it a bit for your needs :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse package explorer vs project explorer view 2 84
Java passing arguments (type error) 2 48
Windows 10 IE Certificate Issue 10 42
arguments to jar 5 17
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now