• Post Reply Bookmark Topic Watch Topic
  • New Topic

why is the ListCellRendererComponent called twice for every list item  RSS feed

 
sangeetha parthasarathy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anybody know why please. I hjave been breaking my head on this the past couple of weeks and it is still beyond me.
Please let me know the answer even if you even have the faintest clue.
Thanks
Sangeetha
 
Daniel Mayer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the JavaDoc of getListCellRendererComponent


If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked.


I guess that is what's happening.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!