• Post Reply Bookmark Topic Watch Topic
  • New Topic

setCellRenderer and folder size  RSS feed

 
Pat Peg
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am building a JTree with custom images for folders. I extend the default treeCellRenderer and then call setCellRenderer. It works great except my images are cut in half because they are to big (I assume that is why). Is there a way to re-size the space that teh image is in and force it to be displayed?

Thanks
 
Pat Peg
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one has had this problem? I have done some research but I still don't find anything specific about folder size. There was a setCellMinimumSize(Dimension) but regardless of how large I made the min size it did not change on the display. Any thoughts please?
 
Pat Peg
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found it!!!

tree.setRowHeight(int value);
 
John Wetherbie
Rancher
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad you found the solution and thanks for posting it!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!