Is there any better way to get the Icon of a JLabel in a container as a BufferedImage whithout multiple casts?
Component[] components = container.getComponents();
BufferedImage image = ((BufferedImage) ((ImageIcon) ((JLabel) components[i]).getIcon()).getImage());