public boolean importIcon(AccountCategory ac, String fileName) { try { BufferedImage orig = ImageIO.read(getClass().getClassLoader().getResource(fileName)); return doImport(ac, fileName, orig); } catch (Exception e) { errMsg = "Image could not be loaded"; logger.error(MiscUtils.stackTrace2String(e)); return false; } }
public boolean importIcon(AccountCategory ac, File f) { try { BufferedImage orig = ImageIO.read(f); return doImport(ac, f.getName(), orig); } catch (Exception e) { errMsg = "Image could not be loaded"; logger.error(MiscUtils.stackTrace2String(e)); return false; } }