🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
3 messages
3 total messages Started by KuoTsan Thu, 16 Sep 2004 21:07
Problem to update JTable
#1022
Author: KuoTsan
Date: Thu, 16 Sep 2004 21:07
16 lines
1548 bytes
Hi!  I have problem to update JTable :
     I  put JProgressBar in a cell of JTable to indicate current progress.
So, I implemented TableModel and TableRenderer to update the JProgressBar.

   Whenever my data update, I invoked "fireTableRowsUpdated(..)" in
TableModel,
then it will call "getTableCellRendererComponent(...)" in TableRenderer.
The problem is when last row stop updating, all preveious rows will stop
too,
unless I resize the windows or select that row.  Debug shows me that when
last row stop updating,   "fireTableRowsUpdated(..)" won't invoke
 "getTableCellRendererComponent(...)" anymore, so all previous won't update.

     Can anyone help me out? Many thanks for you time!

 Kuotsan
Re: Problem to update JTable
#1025
Author: John McGrath [TeamB]
Date: Tue, 21 Sep 2004 02:44
29 lines
1974 bytes
On 9/16/2004 at 5:07:05 PM, KuoTsan wrote:

> I have problem to update JTable :
> I put JProgressBar in a cell of JTable to indicate current progress.
> So, I implemented TableModel and TableRenderer to update the
> JProgressBar.
> 
>    Whenever my data update, I invoked "fireTableRowsUpdated(..)" in
> TableModel,
> then it will call "getTableCellRendererComponent(...)" in TableRenderer.
> The problem is when last row stop updating, all preveious rows will stop
> too,
> unless I resize the windows or select that row.  Debug shows me that when
> last row stop updating,   "fireTableRowsUpdated(..)" won't invoke
>  "getTableCellRendererComponent(...)" anymore, so all previous won't
> update.

My guess is that there is a bug in the event notification code, but there
is no way to be sure without seeing the code.  If you can post a runnable
example of the problem, I will be glad to look at it.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: Problem to update JTable
#840
Author: KuoTsan
Date: Fri, 24 Sep 2004 05:27
37 lines
2242 bytes
Hi! John McGrath , I resolved this problem by using "extends Observable
class"
Many thanks for your response
KuoTsan

"John McGrath [TeamB]" <ng-b@JPMcGrath.net>
news:414f9590$1@newsgroups.borland.com ...
> On 9/16/2004 at 5:07:05 PM, KuoTsan wrote:
>
> > I have problem to update JTable :
> > I put JProgressBar in a cell of JTable to indicate current progress.
> > So, I implemented TableModel and TableRenderer to update the
> > JProgressBar.
> >
> >    Whenever my data update, I invoked "fireTableRowsUpdated(..)" in
> > TableModel,
> > then it will call "getTableCellRendererComponent(...)" in TableRenderer.
> > The problem is when last row stop updating, all preveious rows will stop
> > too,
> > unless I resize the windows or select that row.  Debug shows me that
when
> > last row stop updating,   "fireTableRowsUpdated(..)" won't invoke
> >  "getTableCellRendererComponent(...)" anymore, so all previous won't
> > update.
>
> My guess is that there is a bug in the event notification code, but there
> is no way to be sure without seeing the code.  If you can post a runnable
> example of the problem, I will be glad to look at it.
>
> -- 
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads