resizing imageicon in jbutton java

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

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);