Y
Yamin
Hi all,
Okay, first off. Thanks for all the comments on my JLable.setText
question.
Anywhose, it seems the same pattern of updating swing components in
other threads is followed in many other classes in the code I have to
deal with.
But anyways, for my project I have the oppurtunity to do things
safely. The one aspect that got me thinking though was updating a
JTable from another thread. These tables are going to be large ( >15
columns, a thousand rows perhaps). And data will always be very
often. At least a few times a second (not the whole table of course).
The user will NOT be able to edit the data from the table. Its read
only. My initial instinct is as follows.
class myDataObject //synhronized container with read/write methods
class myTableModel extends AbstractAbstractTableModel
//calls myDataObject for getValue...
//does invokeLater for fireevents
anyone forsee any issues with this or have other suggestions?
Okay, first off. Thanks for all the comments on my JLable.setText
question.
Anywhose, it seems the same pattern of updating swing components in
other threads is followed in many other classes in the code I have to
deal with.
But anyways, for my project I have the oppurtunity to do things
safely. The one aspect that got me thinking though was updating a
JTable from another thread. These tables are going to be large ( >15
columns, a thousand rows perhaps). And data will always be very
often. At least a few times a second (not the whole table of course).
The user will NOT be able to edit the data from the table. Its read
only. My initial instinct is as follows.
class myDataObject //synhronized container with read/write methods
class myTableModel extends AbstractAbstractTableModel
//calls myDataObject for getValue...
//does invokeLater for fireevents
anyone forsee any issues with this or have other suggestions?