Java ImageIcon Load getImageIcon(String filename)

Here you can find the source of getImageIcon(String filename)

Description

get Image Icon

License

Open Source License

Declaration

public static ImageIcon getImageIcon(String filename) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    public static ImageIcon getImageIcon(String filename) {

        return new ImageIcon(ClassLoader.getSystemResource("resources/"
                + filename));/*from w w  w .j  a v a  2  s .c  o  m*/
    }
}

Related

  1. getImageIcon(Class _class, String resourceName)
  2. getImageIcon(final Class baseClass, final String image)
  3. getImageIcon(final String iconName)
  4. getImageIcon(final String location)
  5. getImageIcon(Image imp, int width, int height)
  6. getImageIcon(String filename, String description)
  7. getImageIcon(String name)
  8. getImageIcon(String name)
  9. getImageIcon(String path)