Answers for "add jpg to JPanel"

1

add jpg to JPanel

BufferedImage myPicture = ImageIO.read(new File("path-to-file"));
JLabel picLabel = new JLabel(new ImageIcon(myPicture));
add(picLabel);
Posted by: Guest on June-10-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language