GIF是Java GUI中的洋葱皮

时间:2016-04-07 01:35:17

标签: java project gif

我正在使用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);

Video in Dropbox

0 个答案:

没有答案
相关问题