Advertisement
Lauda

Untitled

Dec 14th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1. package gui;
  2.  
  3. import java.awt.Image;
  4. import java.io.IOException;
  5. import java.net.MalformedURLException;
  6. import java.net.URL;
  7. import java.util.ArrayList;
  8. import java.util.List;
  9.  
  10. import javax.imageio.ImageIO;
  11.  
  12.  
  13. public class Main {
  14.    
  15.     /**
  16.      * @param args
  17.      */
  18.     public static void main(String[] args) {
  19.         final List<Image> icons = new ArrayList<Image>();
  20.         URL url16 = null;
  21.         URL url32 = null;
  22.        
  23.         try {
  24.             url16 = new URL("https://dl.dropboxusercontent.com/u/2844443/Slike/favicon16.png");
  25.         } catch (MalformedURLException e1) {
  26.             // TODO Auto-generated catch block
  27.             e1.printStackTrace();
  28.         }
  29.  
  30.         try {
  31.             url32 = new URL("https://dl.dropboxusercontent.com/u/2844443/Slike/favicon32.png");
  32.         } catch (MalformedURLException e1) {
  33.             // TODO Auto-generated catch block
  34.             e1.printStackTrace();
  35.         }
  36.  
  37.         try {
  38.             icons.add(ImageIO.read(url16));
  39.         } catch (IOException e) {
  40.             // TODO Auto-generated catch block
  41.             e.printStackTrace();
  42.         }
  43.         try {
  44.             icons.add(ImageIO.read(url32));
  45.         } catch (IOException e) {
  46.             // TODO Auto-generated catch block
  47.             e.printStackTrace();
  48.         }
  49.        
  50.         Frame mf = Frame.getInstance();
  51.         mf.setVisible(true);
  52.         mf.setIconImages(icons);
  53.  
  54.  
  55.     }
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement