Article View: borland.public.jbuilder.java.swing
Article #7520Re: JTable scrolling related question
From: John McGrath TeamB
Date: Tue, 16 Jan 2001 07:41
Date: Tue, 16 Jan 2001 07:41
23 lines
1865 bytes
1865 bytes
On Mon, 15 Jan 2001 21:56:00 +0100, Torsten Welches wrote:
> I can reproduce your problem now. I guess John was right,
> scrollRectToVisible fails because the necessary repaint
> happens after the fact.
>
> So invokeLater will do it, although I still consider it a hack.
Did you try simply doing the scroll in an invokeLater()? I thought
that might not work because of the event priorities. Most events are
placed on the event queue with NORMAL priority, whereas PAINT events
are placed with LOW priority. So I think that the invokeLater() call
may still be executed before the repaint event on the JTable, and I
think that is when the JTable gets expanded.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.14cda8bb63412d23989e99@forums.borland.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed.icl.net!ldn-newsfeed.speedport.net!newsfeed.speedport.net!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mailReferences:
<3A1583E1.8FD78A76@netrisk.com> <3a15c300_2@dnews> <3a5c6686_2@dnews> <MPG.14c70100271fd34c989e6f@forums.borland.com> <3a62fa9f_1@dnews> <3a630ad3$1_2@dnews> <3a632376_1@dnews> <3a63648b_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,1fc5e943f0feb2d4 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-15 23:42:06 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.maxwell.syr.edu!newsfeed.icl.net!ldn-newsfeed.speedport.net!newsfeed.speedport.net!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mail From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JTable scrolling related question Date: Tue, 16 Jan 2001 02:41:18 -0500 Organization: Another Netscape Collabra Server User Lines: 23 Message-ID: <MPG.14cda8bb63412d23989e99@forums.borland.com> References: <3A1583E1.8FD78A76@netrisk.com> <3a15c300_2@dnews> <3a5c6686_2@dnews> <MPG.14c70100271fd34c989e6f@forums.borland.com> <3a62fa9f_1@dnews> <3a630ad3$1_2@dnews> <3a632376_1@dnews> <3a63648b_1@dnews> NNTP-Posting-Host: dslcv1-60.fast.net X-Newsreader: MicroPlanet Gravity v2.30