resizing imageicon in jbutton java

Solutions on MaxInterview for resizing imageicon in jbutton java by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "resizing imageicon in jbutton java"
Lena
23 Jul 2016
1Image img = icon.getImage();  
2Image newimg = img.getScaledInstance(NEW_WIDTH, NEW_HEIGHT, java.awt.Image.SCALE_SMOOTH);
3icon = new ImageIcon(newimg);