Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4384
| From | "scoobydoo116" <scoobydoo116@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JTable setValueAt not |
| Message-ID | <d0f71f92-0cb4-4892-acca-2aa6ab2a54e4@y79g2000hsa.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <ymi8wsof3ej.fsf@blackcat.isi.edu> |
| Date | 2011-04-27 15:50 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui
On Oct 16, 7:53 pm, t...@sevak.isi.edu (Thomas A. Russ) wrote:
> scoobydoo...@hotmail.com writes:
> > I am new at Java programming and had run into an issue using JTables.
> > I created a JTable using the NetBeans IDE and am trying to set values
> > into the table cells using setValueAt but I don't see the new values.
>
> Remember that you have to do all of the GUI-related actions on the Event
> Dispatch Thread (EDT). I didn't see any references to that in your
> code. That will certainly disrupt any GUI items, often with rather
> bizarre and unpredictable effects.
>
> --
> Thomas A. Russ, USC/Information Sciences Institute
Ok, here is the original code and I removed it trying to figure out
why setValueAt was not updating the values.
public void CreateUI(/*String args[]*/) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new GDocsTestUI().setVisible(true);
}
});
}
Are you saying that for any updates to the table to be reflected I
need to do something like
public void UpdateValues(....){
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
<call setValueAt>
}
});
}
Thanks
Gan
---
* 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
JTable setValueAt not dis "scoobydoo116" <scoobydoo116@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: JTable setValueAt not "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
Re: JTable setValueAt not "scoobydoo116" <scoobydoo116@THRWHITE.remove-dii-this> - 2011-04-27 15:50 +0000
csiph-web