Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

image scaling on window resize

 
chop ficaro
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Report post to moderator
can i make an image scale to fit the window with BorderLayout.CENTER?
 
Rob Camick
Ranch Hand
Posts: 2599
9
  • Mark post as helpful
  • send pies
  • Report post to moderator
You need to do custom painting to scale the image on the fly. BackgroundPanel shows one way to do this.
 
Darryl Burke
Bartender
Posts: 5132
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Report post to moderator
Apparently continued here without the courtesy of acknowledging Rob's help.
http://www.coderanch.com/t/508226/GUI/java/BackgroundPanel-java-cannot-placed-BorderLayout
 
Rob Spoor
Sheriff
Pie
Posts: 20546
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Chop, please Use One Thread Per Question. I'm going to close this thread; we can continue in the other one.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic