import javax.swing.*; { JFrame ShoppingMarket=new JFrame(); { ShoppingMarket.add(new JLabel(new ImageIcon("C:\\Users\\admin \\Desktop\\The Da Vinci Code.jpg"))); ShoppingMarket.pack(); ShoppingMarket.setVisible(true); } ShoppingMarket.add(new JLabel(new ImageIcon("C:\\Users\\admin \\Desktop\\Angels And Demons.jpg"))); ShoppingMarket.pack(); ShoppingMarket.setVisible(true); } It doesn't clear the screen on closing the first window. so both pictures are shown on screen.