🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #105

TableCellRenderer and colours

#105
From: Vander
Date: Mon, 30 Jan 2006 11:27
29 lines
1631 bytes
DefaultTableCellRenderer does not seem to have correct color reporting. 
Just try the following:

    public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean hasFocus,
          int row,
          int column )
    {
       Color color;

       super.getTableCellRendererComponent( table, value, isSelected, 	 
             hasFocus, row, column );

       color = getForeground();
       setForeground( color );

       return this;
    }

This will produce garbage colouring because getForground() seems to 
operate incorrectly. I need to know fore- and background colours of the 
default cell rendering (look-and-feel dependent). How would I obtain 
this information?

Thanks!
- Vander
Technical Details
Message-ID: <43ddf760$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,5b76ae0641550c2a,start
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 30 Jan 2006 12:27:28 +0100
From: Vander <874505@gmx.de>
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: TableCellRenderer and colours
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.152.234.190
Message-ID: <43ddf760$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1138620256 84.152.234.190 (30 Jan 2006 03:24:16 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!peer01.west.cox.net!cox.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail