File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to force a JPanel te resize

 
Ko Wey
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please could anyone consider following situation:
I have an instance (thumbnail)of class Thumbnail (that extends a JPanel.)en
It sits in a box.
When some event occurs, thumbnail must redraw itself AND CHANGE IT SIZE.
Alas, the redrawing takes place, but not the resizing. Even if I can overload setMaximumSize() or setPreferredSize(). I must have missed something?
Here is the code (sorry if it to much)

Thanks for your time.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick suggestion... try to revalidate the component that contains the thumbnail, not the thumbnail itself. I'll look closer at the code later and see if I notice anything else.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic