Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1604
| From | "Michael Rauscher" <michael.rauscher@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Updating a Single Pro |
| Message-ID | <f1p65d$6ak$1@registered.motzarella.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1178552408.753924.260070@e51g2000hsg.googlegroups.com> |
| Date | 2011-04-27 15:34 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Jason Cavett wrote sth. about JProgressBar in JTable: > > I've been working on the program this morning and I've figured *some* > things out. The progress bar is now updatnig. The problem is that, > if I have multiple rows, ALL of their progress bars are updating when > I only want one to be updating (the one that is currently > processing). It seems as though every cell holds the same > ProgressBarRenderer and I'm not sure how to give each row its own > renderer (especially because the example I was using to help me figure > this out doesn't seem to do that). The problem isn't the single renderer but the single value. Whenever TableModel#getValueAt is called with a column of PROGRESS_BAR_COLUMN it should return the current progress of the given 'row' (e. g. as Integer). The renderer then can use the value parameter in getTableCellRendererComponent to set the current progress value of the JProgressBar. Bye Michael --- * 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 | Find similar | Unroll thread
Updating a Single Progres "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
Re: Updating a Single Pro "Lionel van den Berg" <lionel.van.den.berg@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
Re: Updating a Single Pro "Jason Cavett" <jason.cavett@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
Re: Updating a Single Pro "Michael Rauscher" <michael.rauscher@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
csiph-web