📜  在 JButton java 代码示例中调整 ImageIcon 的大小

📅  最后修改于: 2022-03-11 14:52:16.056000             🧑  作者: Mango

代码示例1
Image img = icon.getImage();  
Image newimg = img.getScaledInstance(NEW_WIDTH, NEW_HEIGHT, java.awt.Image.SCALE_SMOOTH);
icon = new ImageIcon(newimg);