iconloader icon indicating copy to clipboard operation
iconloader copied to clipboard

ImageIcon is not exposed

Open osigge opened this issue 10 years ago • 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).

osigge avatar Jun 24 '14 17:06 osigge

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

bulenkov avatar Jun 25 '14 06:06 bulenkov

Sure, but it will take some time.

osigge avatar Jun 25 '14 07:06 osigge

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

osigge avatar Jun 25 '14 10:06 osigge