How to convert Icon from JLabel into BufferedImage?

Viewed 18697

Simple, very straight forward but seems uncle google and me getting confused.

I have single JLabel that already has its own Icon.

How do I convert the Icon obtained from JLabel into a BufferedImage?

Is there any way around: I tried to multiple casting like this ..

 final BufferedImage bf1 = (BufferedImage)((Image)jll_img.getIcon());

..but it failed.

4 Answers
Related