This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to force a JPanel te resize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to force a JPanel te resize" Watch "how to force a JPanel te resize" New topic
Author

how to force a JPanel te resize

Ko Wey
Ranch Hand

Joined: Sep 08, 2003
Posts: 67
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

Joined: Oct 18, 2000
Posts: 4121

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.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
Consider Paul's rocket mass heater.
 
subject: how to force a JPanel te resize
 
Similar Threads
Graphics 2d Object and Scroll Bar Issue
Repainting a nested JPanel
image label
Graphics 2d Object and Scroll Bar Issue
JScrollPane help