void (@Nullable JFrame frame, boolean visible) { EDT.assertIsEdt(); if (!isValid(frame)) { return; } WinDef.HICON icon = null; if (visible) { synchronized (Win7AppIcon.class) { if (myOkIcon == null) { try { BufferedImage image = ImageIO.read(Objects.requireNonNull(AppIcon.class.getResourceAsStream("/mac/appIconOk512.png"))); byte[] bytes = writeTransparentIco(image); myOkIcon = Win7TaskBar.createIcon(bytes); } catch (Throwable e) { LOG.error(e); myOkIcon = null; } } icon = myOkIcon; } } try { Win7TaskBar.setOverlayIcon(frame, icon, false); } catch (Throwable e) { LOG.error(e); } }