• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Fill jTable with computed data

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 28362
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic