• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The Infamous AbstractTableModel

 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm sure this problem has been encountered before, I even came across it in one of my searches but paid no attention because I was looking for something else. And since the search facility is down at the moment, I can't perform another search.
I have a println statement in my getValueAt method of the TableModel class. Every thing seems be displaying and updating ok, but when I move my mouse over the search results displayed in the jtable, the println statements start printing.
Is this normal behaviour?
If it isn't how can I stop it?
Thanks,
Chiji
 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am sending this email again, please help if you can.

Hi,
I'm sure this problem has been encountered before, I even came across it in one of my searches but paid no attention because I was looking for something else. And since the search facility is down at the moment, I can't perform another search.
I have a println statement in my getValueAt method of the TableModel class. Every thing seems be displaying and updating ok, but when I move my mouse over the search results displayed in the jtable, the println statements start printing.
Is this normal behaviour?
If it isn't how can I stop it?

Thanks,
Chiji
 
Eduard Jodas
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It happens to me, too. No only in this assignment but in other Java programs I have made.
I have always suposed it is JTable normal behaviour. For example it could be useful if the cell rendering changed depending on the mouse position.
 
Chiji Nwankwo
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eduard,
I hope it is normal behaviour. I don't seem to able to find anything about it on the forum.
I'll wait and see.
Regards,
Chiji
 
Gosling Gong
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that's the normal behaviour, because every time you put you mouse on the table, there will be a repaint action generated, so the table will ask the data which will be repainted from its model via getValueAt(). the same thing will also happen when you resize or minimize and maximize the window.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic