This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call a method to set data to JTable?  RSS feed

 
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
Boost this thread!