🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7222

How do you re-render a JTable?

#7222
From: swett
Date: Tue, 03 Jul 2001 20:13
20 lines
1812 bytes
My overall goal is this:  To "highlight" (or color) the row that a user
clicked.

My table is set to disallow editing because the application is a "lookup
only" application.  I don't want users typing any replacement values into
any cells.  When editing is disabled, though, nothing gets automatically
colored as the user clicks a cell.  So I'm trying to color a row when a user
clicks it.

My table uses a tabel model that loads the rows based on the results of a
data set.  I have a method in my table model class for loading the rows from
the result set and firing a table change.

My table also uses a renderer.  However, it appears that the only time the
renderer is triggered is when the table is completely reloaded with a new
data result set.  I don't want to reload the data every time the user clicks
the data.

Is there any easy way to have the table re-rendered when a row is clicked?
If so, how?  Thanks.
Technical Details
Message-ID: <3b4227b7_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9df0a17266721318,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-07-03 13:25:45 PST
Reply-To: <swett@bcswebsite.com>
From: <swett@starband.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: How do you re-render a JTable?
Date: Tue, 3 Jul 2001 16:13:18 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 148.71.34.6
Message-ID: <3b4227b7_1@dnews>
X-Trace: dnews 994191287 148.71.34.6 (3 Jul 2001 13:14:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews