我正在使用GIF作为ImageIcon
,有没有办法可以阻止这种重叠的怪异?文件本身不会像显示的那样重叠。如果有帮助,我还使用getScaledInstance
调整了图片大小:
// Getting GIF and resizing it
ImageIcon yourPokemon = new ImageIcon(this.getClass().getResource("Eevee.gif"));
Image allYours = yourPokemon.getImage();
Image yoursISwear = allYours.getScaledInstance(288, 216, java.awt.Image.SCALE_FAST);
ImageIcon justTakeItAlready = new ImageIcon(yoursISwear);
JLabel Eevee = new JLabel(justTakeItAlready);