Java Swing Icon getIcono()

Here you can find the source of getIcono()

Description

Imagen de icono para la ventana principal

License

Open Source License

Declaration

public static Image getIcono() 

Method Source Code


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

import java.awt.Image;

import java.net.URL;

import javax.swing.ImageIcon;

public class Main {
    /**/*from  w  w w. j  a v a2  s . com*/
     * Imagen de icono para la ventana principal
     *
     * @return
     */
    public static Image getIcono() {
        URL urlDeLaImagen = Main.class.getClassLoader().getResource("images/icon.png");
        ImageIcon img = new ImageIcon(urlDeLaImagen);
        return img.getImage();
    }
}

Related

  1. getIcon(String name, boolean isGrayIcon)
  2. getIcon(String name, ClassLoader classLoader)
  3. getIconCheckBox(String iconPath, String pressIconPath, String rolloverIconPath, String selectedIconPath)
  4. getIconFromExtension(String f, boolean folder)
  5. getIconInterTrial()
  6. getPressedExitIcon(int x, int y)
  7. getResourceIcon(Object target, String name)
  8. getScaledIcon(Icon icon)
  9. getScaledIcon(Icon tmpIcon, int w, int h, boolean incr)