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:
parent
4ee2871934
commit
3306e67304
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user