Check out example codes for "java swing pic". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com