InputStream inputStream = resourceClass.getResourceAsStream(imageResourceName);
if (inputStream != null) {
try {
BufferedImage image = ImageIO.read(inputStream);
button = new BorderlessImageButton(action, new ImageIcon(image));
} catch (IOException e) {
LOGGER.error("Reading image " + imageResourceName, e);
}
}
}