Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change jTable data by jButton events  RSS feed

 
Bikash Megale
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

In my Swing GUI program, there are 5 jTables each having data from different Database table Data.

I want to change jTable and it's data by jButton event.


This code works,





But, if I want to control the categoryRangeBegin or dateRangeBegin from jButton actionPerformed() block, the same code as following does not work




>
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the same code as following does not work


What does that mean?

Does it mean:

a) the TableModel is empty?
b) the table doesn't appear on the GUI?
c) something else?

Generally to it is better to create a new TableModel and then just use table.setModel(...) to refresh a visible table.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!