Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package gui;
- import java.awt.Image;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.ArrayList;
- import java.util.List;
- import javax.imageio.ImageIO;
- public class Main {
- /**
- * @param args
- */
- public static void main(String[] args) {
- final List<Image> icons = new ArrayList<Image>();
- URL url16 = null;
- URL url32 = null;
- try {
- url16 = new URL("https://dl.dropboxusercontent.com/u/2844443/Slike/favicon16.png");
- } catch (MalformedURLException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- try {
- url32 = new URL("https://dl.dropboxusercontent.com/u/2844443/Slike/favicon32.png");
- } catch (MalformedURLException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- try {
- icons.add(ImageIO.read(url16));
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- icons.add(ImageIO.read(url32));
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- Frame mf = Frame.getInstance();
- mf.setVisible(true);
- mf.setIconImages(icons);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement