Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

resizing ImageIcon in JButton java

Image img = icon.getImage();  
Image newimg = img.getScaledInstance(NEW_WIDTH, NEW_HEIGHT, java.awt.Image.SCALE_SMOOTH);
icon = new ImageIcon(newimg);
 
PREVIOUS NEXT
Tagged: #resizing #ImageIcon #JButton #java
ADD COMMENT
Topic
Name
3+3 =