Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call a method to set data to JTable?

 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am inside a constructor of a JFrame which calls the method "setData".

The weird thing is that it doesn't go inside the for-loop.



I see this in console:

Step 1
Step 2
Step 4


"innhold" is a DefaultTableModel.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At Step 2, if you put in

System.out.println(tabell.size()) what does it say?

Cheers,
Rachel
 
kelvin cheung
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

eheh....
thank you Rachel.
i forgot that the table was empty. dumb mistake
sorry about this question.


regards,
kelvin.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic