🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #93

Re: Help to solve flickering Checkbox in JTable

#93
From: Ben Munday
Date: Thu, 15 Jan 2004 06:46
41 lines
2413 bytes
The solution was to change all the references to Class Checkbox to Class 
JCheckBox.

Firstly, i appreciate your willingness to answer a question in comunity 
newsgroups.

Secondly, if you are going to present you answers as correct, make sure 
they are. Did you make the changes in the code and then test it? Or did 
you think that you had the right answer so you didn't bother to make 
sure.....

Ben

ak wrote:

> the column that holds the Checkbox continually updates the
> 
>>fields. I cannot select the Checkbox and i can only just see that the
>>correct info for the Checkbox is in the cell.
> 
> 
>>     public Component getTableCellRendererComponent(JTable table, Object
>>cBox, boolean isSelected, boolean hasFocus, int row, int column)
>>     {
>>    Checkbox newCheckbox = (Checkbox)cBox;
>>    newCheckbox.setState(false);
>>    return newCheckbox;
>>     }
> 
> 
> lol, its because you call setState(false) from
> getTableCellRendererComponent();
> 
> throw  newCheckbox.setState(false); away then everything work.
> --
> 
> ____________
> 
> http://reader.imagero.com the best java image reader.
> 
> 
Technical Details
Message-ID: <4006373c$1@duster.adelaide.on.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.mel.connect.com.au!news.ade.connect.com.au!duster.adelaide.on.net!not-for-mail
References: <400613be$1@duster.adelaide.on.net> <bu56bk$agr$1@online.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,93a0ed3014c56a0
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 10fd6d,93a0ed3014c56a0
X-Google-Attributes: gid10fd6d,public
X-Google-Thread: 113ae9,93a0ed3014c56a0
X-Google-Attributes: gid113ae9,public
X-Google-ArrivalTime: 2004-01-14 22:46:21 PST
Date: Thu, 15 Jan 2004 17:46:19 +1100
From: Ben Munday <benny111@hotmail.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: aus.computers.java,comp.lang.java.help,comp.lang.java.gui
Subject: Re: Help to solve flickering Checkbox in JTable
References: <400613be$1@duster.adelaide.on.net> <bu56bk$agr$1@online.de>
In-Reply-To: <bu56bk$agr$1@online.de>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: ppp126-160.lns1.syd3.internode.on.net
Message-ID: <4006373c$1@duster.adelaide.on.net>
X-Trace: duster.adelaide.on.net 1074149180 ppp126-160.lns1.syd3.internode.on.net (15 Jan 2004 17:16:20 +1050)
Lines: 42
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.mel.connect.com.au!news.ade.connect.com.au!duster.adelaide.on.net!not-for-mail