File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes jTable refresh? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jTable refresh?" Watch "jTable refresh?" New topic
Author

jTable refresh?

Sachindra Pratap
Ranch Hand

Joined: Jun 03, 2008
Posts: 42
hi,
In my application ,i am using jTable.
jTable consist of four column.
At fourth column ,check box is being added,during run time.

So now the problem description.
Suppose in database table there are four records,i get those records,
and set them in jTable,with corresponding check box.

So now in jtable there are four records as well as four corresponding check box.

next ,when in table there are only two records,programtically i will get
those records, set them again in jtable ,but now this time two records are
set in jtable ,with corresponding check box,but the next two other rows
also contain the check box.

so please write, what could be the problem

regards
Sachindra
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

Originally posted by Sachindra Pratap:
.., set them again in jtable ,


How are you "setting" them in the table? Do you have a customized table model which holds the data?
Usually, when you tweak the model, you also need to fire the fireTableDataChanged() for the changes to be reflected in the table.
If you can post the "set them in the table" code, we can try and identify what is going wrong.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jTable refresh?
 
Similar Threads
JTable
jtable
JTable
JTable
JTable