Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes image scaling on window resize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic

image scaling on window resize

chop ficaro
Ranch Hand

Joined: May 02, 2010
Posts: 30
can i make an image scale to fit the window with BorderLayout.CENTER?
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2180
You need to do custom painting to scale the image on the fly. BackgroundPanel shows one way to do this.
Darryl Burke

Joined: May 03, 2008
Posts: 4531

Apparently continued here without the courtesy of acknowledging Rob's help.

luck, db
There are no new questions, but there may be new answers.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19684

Chop, please Use One Thread Per Question. I'm going to close this thread; we can continue in the other one.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: image scaling on window resize