Advertisement
tmcopeland

testGif.java

Oct 13th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1. package com.taylorcopeland.example.testGif;
  2.  
  3. import java.net.MalformedURLException;
  4. import java.net.URL;
  5.  
  6. import javax.swing.ImageIcon;
  7. import javax.swing.JFrame;
  8. import javax.swing.JLabel;
  9.  
  10. public class TestGif extends JFrame {
  11.  
  12.     /**
  13.      *
  14.      */
  15.     private static final long serialVersionUID = 3225207808782293145L;
  16.  
  17.     /**
  18.      * @param args
  19.      */
  20.     public static void main(String[] args) throws MalformedURLException {
  21.         // TODO Auto-generated method stub
  22.         final URL location = new URL(
  23.                 "http://upload.wikimedia.org/wikipedia/commons/archive/f/f0/20060824220301!Zipper_animated.gif");
  24.  
  25.         final JFrame f = new JFrame("GIF");
  26.         f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  27.         f.add(new JLabel(new ImageIcon(location)));
  28.         f.pack();
  29.         f.setVisible(true);
  30.     }
  31.  
  32. }
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement