bulenkov/iconloader

ImageIcon is not exposed

Opened this issue · 3 comments

I need to use the ImageIcon to draw additional shapes on it. I get a ClassCastException when I try to cast the Icon from getIcon to ImageIcon.
I tried getting the Image object through loadFromResource so I can draw on that but the image does not show on the retina screen (in a JMenuItem). When there's no @2x image the standard image shows though. I'm using JDK8.
I fiddled with the IconLoader but I'm not able to get a scaled down version of the image (change the code to use ImageIO class).

Hi. Could you please attach a simple snippet of code demonstrating the problem? Thanks

Sure, but it will take some time.

Ok, demo is here: https://github.com/osigge/IconLoaderTest
I used JDK8 on a rMBP