Eltorzult gif

Eltorzult gif
2009-09-12T09:47:24+02:00
2009-09-14T10:17:33+02:00
2022-07-31T21:50:29+02:00
FriciX
Hello
Adott egy gif kiterjesztesu kep de torzan jelenik meg mindeg , mas kep pedig villog. Hogyan tudnem megoldani hogy "normalisan" jelenjen meg a kep?


import java.net.MalformedURLException; import java.net.URL; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class MainClass extends JFrame { public static void main(String[] args) { new MainClass(); } public MainClass() { java.net.URL where = null; try { where = new URL("http://l.yimg.com/us.yimg.com/i/mesg/emoticons7/10.gif"); } catch (MalformedURLException ex) { ex.printStackTrace(); } ImageIcon anotherIcon = new ImageIcon(where); this.setTitle("Picture Application"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel1 = new JPanel(); panel1.add(new JLabel( anotherIcon)); this.add(panel1); this.pack(); this.setVisible(true); } }
Mutasd a teljes hozzászólást!

abcd