Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Retarding the repainting of a JComponent

Reply
Thread Tools

Retarding the repainting of a JComponent

 
 
Richard B. Christ
Guest
Posts: n/a
 
      10-24-2003
I am working with a table (not the JTable but a fully customized
extension of
JComponent). With this table it is possible to have some rows selected
and to have column sorted(s) for instance. This table implementation
is per default embedded in a JScrollPane.
After having changed the whole model of the table, I would like to
retrieve the
previous state (defined by the position of the scrollbar, the selected
rows and the sorted column(s)) of the table. While doing this Java
does the things one after the other so that the user sees the whole
process (what is not very elegant):
- user gets a new table
- old selected rows gets selected
- old sorted columns get sorted
- scrollbar updates its state
I would like Java making all these updating steps before showing the
table. I would like Java retarding the repainting of the table until
the table has selected its previous selected rows, until the table has
sorted its previous sorted columns and so on. How can I achieve that?
Any help would be gracefully appreciated. Cheers,

richard
 
Reply With Quote
 
 
 
 
Harald Hein
Guest
Posts: n/a
 
      10-25-2003
"Richard B. Christ" wrote:

> While doing this Java
> does the things one after the other so that the user sees the whole
> process (what is not very elegant):
>


No, it is not Java, it is you who does this by firing the corresponding
events. First do all your changes in the model, than fire one event
telling the JTable to update the display.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tooltip on JComponent Mahesh S Java 1 01-31-2007 06:03 PM
How to ensure a square JComponent? Jacob Java 8 03-18-2006 12:40 AM
JComponent on JTree smat Java 2 10-25-2005 04:34 AM
How to "ghost" a jcomponent? dbritton Java 2 02-05-2004 01:29 AM
JComponent repaint nightmare Roger Davis Java 3 12-11-2003 12:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57