Here you can find the source of getEingabeImage(int x, int y)
public static ImageIcon getEingabeImage(int x, int y)
//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); } }