Article View: borland.public.jbuilder.java.swing
Article #7529Re: JTable scrolling related question
From: John McGrath TeamB
Date: Wed, 17 Jan 2001 08:30
Date: Wed, 17 Jan 2001 08:30
31 lines
2224 bytes
2224 bytes
On 16 Jan 2001 00:57:29 -0800, Torsten Welches wrote:
> according to the documentation invokeLater will "be deferred
> until all pending events have been processed" - this should
> include paint events as well.
Yes, I see now that it says that. But I have read the source code and
did not see anything that would ensure that. I will have to write some
test code and see whether it actually happens.
> Well, this is why I consider it a hack - painting will first
> take place for the unscrolled table and after that once again
> to reflect the scrolling. The result will be a short flickering,
> I guess.
I am guessing that is true, and I agree it is a hack, just as the
paintImmediately() approach I mentioned would be. I think a JTable
should set its size at the time that it receives the TableModelEvent.
That would solve the problem.
I mentioned another approach in a previous post: setting the size of
the JTable when you add to it. I presume that you could just set its
size to its preferred size. Has anyone tried that approach?
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.14cf1966e46ade3d989ea7@forums.borland.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!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> <MPG.14cda8bb63412d23989e99@forums.borland.com> <3a640cf9_2@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-17 00:34:02 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!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: Wed, 17 Jan 2001 03:30:37 -0500 Organization: Another Netscape Collabra Server User Lines: 32 Message-ID: <MPG.14cf1966e46ade3d989ea7@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> <MPG.14cda8bb63412d23989e99@forums.borland.com> <3a640cf9_2@dnews> NNTP-Posting-Host: dslcv1-60.fast.net X-Newsreader: MicroPlanet Gravity v2.30