Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #199 > unrolled thread
| Started by | "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:26 +0000 |
| Last post | 2011-04-27 15:26 +0000 |
| Articles | 8 — 3 participants |
Back to article view | Back to comp.lang.java.gui
Problem - cannot display "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "Jeff" <jeff@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
Re: Problem - cannot disp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
| From | "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Problem - cannot display |
| Message-ID | <1164633179.048475.310460@j44g2000cwa.googlegroups.com> |
To: comp.lang.java.gui
There seems to be a problem with processing and inserting large (>2000)
amounts of data into jtable.
I read single rows from a database, do some processing and use
insertrow() to feed them to jtable. They get to be displayed (UI) as
soon ALL rows are done and over with, whereas the desired functionality
is to be displayed as soon as they are entered (row by row).
Need help as this is turning up to take too much time to figure out.
Have tried several approaches with no luck.
Some code is listed below:
// Create staff
DefaultTableModel model_matrix = new DefaultTableModel();
JScrollPane jScrollPane_matrix = new JScrollPane();
JTable jTable_matrix = new JTable(model_matrix) {
public boolean isCellEditable(int rowIndex, int vColIndex) {
return false;
}
// Add some columns
model_matrix.addColumn("Timestamp");
model_matrix.addColumn("hpic");
//Insert rows
while (more db rows...){
read row...
process row...
//insert row
i = model_matrix.getRowCount();
model_matrix.insertRow(i, new Object[] {timestamp, HPIC});
model_matrix.fireTableRowsInserted(i,i); setSelectedRow(i);
}
Need help, thanxs
---
* 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
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164635510.109724.215240@f16g2000cwb.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui,comp.l dtsignopoulos@gmail.com wrote: > There seems to be a problem with .. ..multi-posting? Yes. Terrible, isn't it? Please don't be part of the problem. (X-post to c.l.j.p./g., w/ f-u to c.l.j.g.) Andrew T. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164654584.745603.258040@45g2000cws.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui د/ا Ian Wilson فمٌلّه: > dtsignopoulos@gmail.com wrote: > > Andrew, please try to be part of the solution, since you are rather > > chatty I am sure you can get it together should you decide to try. Be > > clear on what you say instead of trying to show how smart or not you > > are. In any case, if you have nothing to add to the issue posted please > > move along. Thanx. > > > > Maybe you are unaware of the meaning of multi-posting, which is what > Andrew's comment was about. > > If so, you might find this useful: > http://www.cs.tut.fi/~jkorpela/usenet/xpost.html > > > > P.S. Andrew, I guess you have some reason's for not including such a > link in your responses to multi-posters? Thanx Ian, indeed I was not aware of the meaning of multi-posting and yes I multi-posted the problem letting the pressure for a solution take over 4 me. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Jeff" <jeff@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164684060.416689.67220@45g2000cws.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui
dtsignopoulos@gmail.com wrote:
> There seems to be a problem with processing and inserting large (>2000)
> amounts of data into jtable.
>
> I read single rows from a database, do some processing and use
> insertrow() to feed them to jtable. They get to be displayed (UI) as
> soon ALL rows are done and over with, whereas the desired functionality
> is to be displayed as soon as they are entered (row by row).
>
> Need help as this is turning up to take too much time to figure out.
> Have tried several approaches with no luck.
>
> Some code is listed below:
>
> // Create staff
> DefaultTableModel model_matrix = new DefaultTableModel();
> JScrollPane jScrollPane_matrix = new JScrollPane();
> JTable jTable_matrix = new JTable(model_matrix) {
> public boolean isCellEditable(int rowIndex, int vColIndex) {
> return false;
> }
>
> // Add some columns
> model_matrix.addColumn("Timestamp");
> model_matrix.addColumn("hpic");
>
> //Insert rows
> while (more db rows...){
> read row...
> process row...
> //insert row
> i = model_matrix.getRowCount();
> model_matrix.insertRow(i, new Object[] {timestamp, HPIC});
> model_matrix.fireTableRowsInserted(i,i); setSelectedRow(i);
>
> }
>
> Need help, thanxs
Back to the original question.....(multi posting is a problem, deserves
a mention, but should not be the only response to the question...)
A couple ideas.
The problem of taking too much time to load can be shortened by
limiting the number of rows loaded. You have a table model that is
loading far more data than will be displayed. With a little coding you
can load a limited subset, sliding that subset along depending on the
user needs.
Alternative - fool the user. You probably display about 20 rows. Load
50 into the tablemodel and display. In the meantime load the 2000 into
a second table model, then switch table models. A kludge, certainly,
but it gives the user something to look at while you load the remainder.
---
* 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
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164687737.287793.187210@j44g2000cwa.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui Jeff wrote: ... > Back Back where? >..to the original question.. Which *one*? >......(multi posting is a problem, deserves > a mention, but should not be the only response to the question...) It was not the only answer. A technical (and in 99% probablility - correct) answer* has already been provided... on the *original* question on c.l.j.p. * I recommend you check it out, if you can locate it. ;) Andrew T. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164690351.905189.303890@l39g2000cwd.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui Andrew Thompson wrote: > Ian Wilson wrote: > .... > > P.S. Andrew, I guess you have some reason's for not including such a > > link in your responses to multi-posters? > > - Time (not enough) > - Volume (too many) > - Patience (0) Ohhh.. and what I keep forgetting to add is - that .. My short (sharp) messages to those who make the mistake of posting to more than one group, are more for the benefit of the people who provide answers, but are unable/willing to spend their time assisting multi-posters. I am pretty sure those people don't need a link on multi-posting, ..though if they are feeling generous enough, they might pop that link in to the thread, as you did. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "dtsignopoulos" <dtsignopoulos@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164798121.847877.156460@j72g2000cwa.googlegroups.com> |
| In reply to | #214 |
To: comp.lang.java.gui Andrew, (urgently) please show some respect for the poster who has asked you to move along. Thanx. --- * 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
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:26 +0000 |
| Subject | Re: Problem - cannot disp |
| Message-ID | <1164800030.740547.24230@h54g2000cwb.googlegroups.com> |
| In reply to | #199 |
To: comp.lang.java.gui dtsignopoulos@gmail.com wrote: > Andrew, (urgently) please show some respect for the poster who .. Who? >...has asked you to move along. Nobody has (unless you are foolish enough to try!). >...Thanx. dtsignopoulos (urgently) please stop imagining things. As a tip. The single thing that would be most likely to stop me making further (non-technical) posts to this thread, and encourage others who feel the same way, to contribute, is a statement from you to the effect that 'it will not happen again'. Rereading all the posts you have made, I do not see that simple assurance, and until I do, I am .. 1) presuming that you have every intention of multi-posting in future. 2) therefore deserve /no/ further help. So, your call.. Andrew T. --- * 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web