• Post Reply Bookmark Topic Watch Topic
  • New Topic

Fill jTable with computed data

 
Juergen Baisch
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to swing and using Netbeans 6.8.

My GUI has a jTable which I have created with Mantisse. Now I want to fill it with computed data. The data is not stored in a file or database. It is in an array of double, e.g.

I always know the number of columns but not the number of rows. The number or rows varies.
What I have got from Mantisse is:


How have I to modify the code to get it working?

Thank you very much in advance.
 
Paul Clapham
Sheriff
Posts: 21862
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, keep a reference to your DefaultTableModel.

Second, when you want to add a row to the table, call the addRow() method on that DefaultTableModel.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!