File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes How to update a JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "How to update a JTable" Watch "How to update a JTable" New topic
Author

How to update a JTable

Niu Xiuyuan
Ranch Hand

Joined: Jun 08, 2001
Posts: 68
I use Jtable to show data which come from database,and when I input new sql query-string then the data in JTable must be update at the same time.My question is how to do so?
i have one solution,but it doesn't work well,could tell me why?

table is a global reference of JTable instance,
so i think set the global reference a new value which point to the new JTable object and then let GUI repaint().
how can help me?

Sun Certified Java Programmer<br />Sun Certified Web Component Developer
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
JTable is not on the exam.
------------------

http://www.jchq.net Mock Exams, FAQ,
Tutorial, Links, Book reviews
Java 2 Exam Prep, 2nd Edition by Bill Brogden and Marcus Green
=================================================
JCHQ, Almost as good as JavaRanch
=================================================


SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
 
 
subject: How to update a JTable