File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes jtable update problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "jtable update problem" Watch "jtable update problem" New topic
Author

jtable update problem

fadi mujahid
Greenhorn

Joined: Oct 14, 2002
Posts: 28
Hello
Everytime I update the JTable with different number of rows, the table gets messed up.
For example, if the new search has less rows than the previous one, the old rows are displyed under the new ones in a weired way!
Any comment?
Thank you
Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hi Fadi,
tables are tricky. Here's how I solved the problem: I spent my custom table model a method called "clear()":

Hope this helps.


Mag
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jtable update problem