Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #173
| From | "Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JScrollPane - ScrollB |
| Message-ID | <iJmdnWN2cc4tQfvYRVnysw@bt.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1164367301.679322.327360@m7g2000cwm.googlegroups.com> |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Bart Cremers wrote: > Bill wrote: > >>Hi All, >> >> I have a JScrollPane containing a JTable. >> >> I programatically traverse the JTable by selecting rows and scrolling >>the JTable >> >> jTable.scrollRectToVisible(r); >> >> >> However the scrollbar doesn't get updated until after all my processing >>has completed, then the scrollbar 'jumps' to the bottom. Is there any way to >>get it to be updated while the jTable is being processed, so the user has >>some indication of how far the processing has progressed? >> >>TIA >> >>Bill > > > The issue here probably is the fact that Java doesn't get the time to > repaint the scrollpane/table. > > To solve this allow remove control from your traverse thread (hopefully > this is a different thread then the event thread) for a short period by > using Thread.yield() or thread.sleep(50). > I wonder if thread priorities might also be an issue? On my non-GUI worker threads I use t.setPriority(Thread.NORM_PRIORITY); before invoking t.start();. Just a thought. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar
JScrollPane - ScrollBar - "Bill" <bill@THRWHITE.remove-dii-this> - 2011-04-27 15:25 +0000
Re: JScrollPane - ScrollB "Bart Cremers" <bart.cremers@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: JScrollPane - ScrollB "Ian Wilson" <ian.wilson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: JScrollPane - ScrollB "Bill" <bill@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: JScrollPane - ScrollB "Nigel Wade" <nigel.wade@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web