package util;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.URL;
public class GameUtil {
//工具类通常会将构造方法私有
private GameUtil(){
}
public static Image getImage(String path) {
URL u= GameUtil.class.getClassLoader().getResource(path);
BufferedImage img=null;
try {
img= ImageIO.read(u);
} catch (IOException e) {
e.printStackTrace();
}
return img;
}
}
最近下载更多
ClydeSon LV5
2023年12月27日
1474371745 LV1
2023年12月23日
微信网友_6699076084797440 LV7
2023年10月30日
lsglsg9 LV23
2022年9月27日
uuuuuu1 LV1
2022年6月3日
姜广坤 LV14
2022年5月21日
二十 LV1
2021年12月8日
15661649928 LV1
2020年12月12日
jrh947869206 LV4
2020年12月7日
Zcjiayouya LV1
2020年9月6日
最近浏览更多
微信网友_7556339099734016 LV3
6月23日
13133117021 LV5
2024年12月24日
saikiTEST
2024年12月12日
暂无贡献等级
yimaoermao LV1
2024年9月21日
luoyanglin LV2
2024年9月14日
azzzz1 LV2
2024年6月26日
bill1234 LV1
2024年6月23日
RicardoLou
2024年5月7日
暂无贡献等级
ClydeSon LV5
2023年12月27日
1474371745 LV1
2023年12月23日

