Java Image getEingabeImage(int x, int y)

Here you can find the source of getEingabeImage(int x, int y)

Description

get Eingabe Image

License

Open Source License

Declaration

public static ImageIcon getEingabeImage(int x, int y) 

Method Source Code

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

import java.awt.Image;
import javax.swing.ImageIcon;

public class Main {
    private static ImageIcon Eingabe = null;
    private static final String IMAGE_FOLDER = "Images";
    private static final String EINGABE_IMAGE = "/Eingabe.png";

    public static ImageIcon getEingabeImage(int x, int y) {
        if (Eingabe == null) {
            Eingabe = new ImageIcon(IMAGE_FOLDER + EINGABE_IMAGE);
        }/*from   www. java 2s .com*/
        return prepareImage(Eingabe, x, y);
    }

    private static ImageIcon prepareImage(ImageIcon icon, int x, int y) {
        Image img = icon.getImage();
        Image newImg = img.getScaledInstance(x, y, java.awt.Image.SCALE_SMOOTH);
        return new ImageIcon(newImg);
    }
}

Related

  1. generateImageVisualizationPanel(String path, int width, int height, int scaling)
  2. getChatLogoImage(int width, int height)
  3. getChatLogoImageBig(int width, int height)
  4. getColoredImage(Color color, int width, int height)
  5. getDisabledImage(Image image)
  6. getHeight(Image imagen)
  7. getImageByFilename(String filename)
  8. getImageImmediate(final Image image)
  9. GetImagenConTamanioDado(File file, int ancho, int alto)