1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2025-02-17 01:51:24 +01:00

Add SwingHelper.readImageIcon().

This commit is contained in:
sk89q 2015-07-20 14:52:16 -07:00
parent 4ee2871934
commit 3306e67304

View File

@ -305,6 +305,15 @@ public final class SwingHelper {
}
}
public static ImageIcon readImageIcon(Class<?> clazz, String path) {
BufferedImage image = readIconImage(clazz, path);
if (image != null) {
return new ImageIcon(image);
} else {
return null;
}
}
/**
* Focus a component.
*