Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.taylorcopeland.example.testGif;
- import java.net.MalformedURLException;
- import java.net.URL;
- import javax.swing.ImageIcon;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- public class TestGif extends JFrame {
- /**
- *
- */
- private static final long serialVersionUID = 3225207808782293145L;
- /**
- * @param args
- */
- public static void main(String[] args) throws MalformedURLException {
- // TODO Auto-generated method stub
- final URL location = new URL(
- "http://upload.wikimedia.org/wikipedia/commons/archive/f/f0/20060824220301!Zipper_animated.gif");
- final JFrame f = new JFrame("GIF");
- f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- f.add(new JLabel(new ImageIcon(location)));
- f.pack();
- f.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement