Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ private Resources() {
}

/**
* @param fname the absolute path in the jar/project
* @param fname the absolute path in the jar/project, or {@code null} if the property naming it
* was never set
* @return the buffered image, wrapped in an Icon
*/
public static BufferedImage loadImage(String fname) {
if (fname == null) {
System.err.println("No resource path given (missing property?) - using placeholder image");
return createDummyImage(64, 64, "?");
}
try {
String fullPath = "/" + fname;
URL rsc = Resources.class.getResource(fullPath);
Expand Down