Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Locking JPanel size to some aspect-ratio

843804Jul 11 2005 — edited Jul 12 2005
Hey there.

If this question sounds like one that's coming from an amateur, it's because it is.

I have a JPanel that holds an Image object, and I am looking for a way to restrict the way my JPanel (and the JFrame as a whole) shrinks & grows as it is being resized to prevent it from messing up with my image display. I've tried using setPreferredSize(), setMinimumSize(), but they have no effects whatsoever. How can I just do that?

Thanks in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2005
Added on Jul 11 2005
6 comments
741 views