the icon image is not showing in the frame plus I use NetBeans
static void display_frame1() {
JFrame frame = new JFrame();//create and name frame
frame.setTitle("U'sh Bookstore"); //set title
frame.setSize(420, 420); //set frame size
frame.setLocationRelativeTo(null);
frame.setResizable(false);// frame cant be resized
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //exit frame
frame.getContentPane().setBackground(Color.pink);
ImageIcon image = new ImageIcon("icon.jpg");//create an image icon
frame.setIconImage(image.getImage());//change icon frame --> IT IS NOT
frame.getContentPane().setBackground(Color.pink);
frame.setVisible(true);//make frame visible
}