Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package game;
- import java.awt.Image;
- import java.io.File;
- import java.io.IOException;
- import javax.imageio.ImageIO;
- public class ImageUtil {
- // метод для загрузки из-я по имени файла
- public static Image loadImage(String fileName) {
- //
- try {
- return ImageIO.read(new File(fileName));
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement