Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

Calling getTableCellRendererComponent manually

Thread view: 
Seref Arikan - 12 Feb 2004 16:17 GMT
Hi,
I am trying to implement the following behaviour on a JTable: when mouse is
over a row, the row's background color should change.
I am using custom renderers for all the columns, so i am changing the color
of background in these controls manually.
The point i'm stuck is: i need a way to call getTableCellRendererComponent
manually, so that i can call this method for all the cells in the row, which
is under the mouse pointer. My custom renderers, check if the current
rendered row is under mouse, and renders a different bg color if so.
So far, only way i've found is to call editCellAt() for all cells in row,
which in fact returns my custom renderer again. This is the only way i could
cause a call to getTableCellRendererComponent  in the table. I think i can
make it work this way, but i did not like it.
Is there any way for calling getTableCellRendererComponent for a spesific
cell in jTable to update only that cell?

Best Regards
Seref Arikan
Seref Arikan - 13 Feb 2004 16:32 GMT
Ok,
i have to confess, i totally forgot about fireTableXyzUpdated methods in
abstact table model, which is exactly what i want


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.