Adding image to JPanel Java

Adding Image to JPanel

BufferedImage myPicture = ImageIO.read(new File("path-to-file"));
JLabel picLabel = new JLabel(new ImageIcon( myPicture ));
add( picLabel );

:D

No comments :

Post a Comment

Your Comment and Question will help to make this blog better...