Java can display png, jpg a some other picture formats, but i have to display a bmp file in a JLable by getting the file path.
ImageIcon imageIcon = new Imag
javax.imageio.ImageIO supports the BMP format:
Image image = ImageIO.read(imageFile); ImageIcon icon = new ImageIcon(image); JLabel label = new JLabel(icon);
ImageIO can also be used to convert between different formats.