Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3514

Swing firePropertyChange

From "ptomblin+netnews" <ptomblin+netnews@THRWHITE.remove-dii-this>
Subject Swing firePropertyChange
Message-ID <g0kns2$hub$1@xen1.xcski.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:45 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
If I modify a model, say an AbstractTableModel, in a thread, and then call
firePropertyChange or fireTableDataChanged, will the subsequent repaint
happen in the AWT thread, or do I have to use SwingUtilities.invokeLater
to fire the change in the AWT thread?

Also, are Swing and AWT smart enough to merge redundant property changes,
so if I call fireTableDataChanged 1000 times while the AWT thread is doing
something else, it will only repaint the table once?

-- 
Paul Tomblin <ptomblin@xcski.com> http://blog.xcski.com/
Mommy, what does "Formatting Drive C:" mean?

---
 * 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 | Find similar | Unroll thread


Thread

Swing firePropertyChange "ptomblin+netnews" <ptomblin+netnews@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000

csiph-web