Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

No data in JTable  RSS feed

 
Haiko van der Schaaf
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,

I construct a JTable with a DefaultTableModel. But after filling in some data in the table on the screen, my program can not find any data in the TableModel, everything is null. I understand from the Java API (5.0) that there is default a TableModelListener. Does anyone how an idea how this is possible ??

Thanks for the help

The code is below:
instantiating the table -->


retreiving data


[ January 19, 2007: Message edited by: Haiko van der Schaaf ]
 
Brian Cole
Author
Ranch Hand
Posts: 935
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your code looks ok to me. Are you sure the retreiving data (sic) code runs after the user has entered the data?

I'm not sure what you are asking about TableModelListener. The interface existed long before 5.0, and I'm not sure what you mean by a "default" one.
 
Haiko van der Schaaf
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it fixed. I made the mistake to clean the data of the JTable by nullifying the JTable. Appareantly the JScrollpane, where i add the JTable to, and the JTable went out of sync.

Thanks for your trouble.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!