Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to update a JTable

 
Niu Xiuyuan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
=================================================
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic