Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 2612
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: 5148
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: 20608
63
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.
 
    Bookmark Topic Watch Topic
  • New Topic