title: set Icon gives error on JLabel
body: <p>I'm having an issue with trying to change the icon of a <code>JLabel</code>. I am using the windowbuilder addon in eclipse to make this program, so just disregard all the bad naming choices of the label and all that, they will be changed later.</p>
  
  <p>The error I'm having is that at the bottom of the my code where I try to change the icon of <code>label_1</code>, I get the following message.</p>
  
  <blockquote>
    <p>The method seticon(icon) in the type jlabel is not applicable for the
    arguments (string)</p>
  </blockquote>
  
  <p>Does anyone have any idea what this could be?</p>
  
  <p>Here is my code. Sorry that it's rather long, that's window builder for you I suppose: </p>
  
  <pre><code>import java.awt.EventQueue;
  import javax.swing.*;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.border.EmptyBorder;
  import javax.swing.JLabel;
  import java.awt.Font;
  import javax.swing.JButton;
  import java.awt.Color;
  import javax.swing.ImageIcon;
  import java.awt.event.ActionListener;
  import java.awt.event.ActionEvent;
  public class Game  {
  public Timer bomb1;
  public JLabel label;
  public JLabel label_1;
  public JLabel lblScore;
  public JButton btnQuit;
  public JLabel label_2;
  public JLabel label_3;
  public JLabel label_4;
  public JLabel label_5;
  public JLabel label_6;
  public JLabel label_7;
  public JLabel label_8;
  public JLabel label_9;
  public JLabel label_10;
  public JLabel label_11;
  public JLabel label_12;
  public JLabel label_13;
  public JLabel label_14;
  public JLabel label_15;
  public JLabel label_16;
  public JLabel lblDodgeTheBombs;
  public JFrame frame;
  private JPanel contentPane;
  public static void main(String[] args) {
      EventQueue.invokeLater(new Runnable() {
          public void run() {
              try {
                  Game window = new Game();
                  window.frame.setVisible(true);
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
      });
  }
  public Game() {
      frame = new JFrame();
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setBounds(100, 100, 489, 512);
      contentPane = new JPanel();
      contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
      frame.setContentPane(contentPane);
      contentPane.setLayout(null);
  
      label_1 = new JLabel("");
      label_1.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_1.setBackground(Color.WHITE);
      label_1.setBounds(59, 44, 80, 80);
      contentPane.add(label_1);
  
      label = new JLabel("0");
      label.setFont(new Font("Tahoma", Font.PLAIN, 14));
      label.setBounds(71, 12, 46, 14);
      contentPane.add(label);
  
      lblScore = new JLabel("Score:");
      lblScore.setFont(new Font("Tahoma", Font.PLAIN, 14));
      lblScore.setBounds(28, 11, 45, 17);
      contentPane.add(lblScore);
  
      btnQuit = new JButton("Quit");
      btnQuit.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
              frame.dispose();
          }
      });
      btnQuit.setBounds(359, 10, 89, 23);
      contentPane.add(btnQuit);
  
      label_2 = new JLabel("");
      label_2.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_2.setBackground(Color.WHITE);
      label_2.setBounds(149, 44, 80, 80);
      contentPane.add(label_2);
  
      label_3 = new JLabel("");
      label_3.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_3.setBackground(Color.WHITE);
      label_3.setBounds(239, 44, 80, 80);
      contentPane.add(label_3);
  
      label_4 = new JLabel("");
      label_4.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_4.setBackground(Color.WHITE);
      label_4.setBounds(329, 44, 80, 80);
      contentPane.add(label_4);
  
      label_5 = new JLabel("");
      label_5.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_5.setBackground(Color.WHITE);
      label_5.setBounds(59, 138, 80, 80);
      contentPane.add(label_5);
  
      label_6 = new JLabel("");
      label_6.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_6.setBackground(Color.WHITE);
      label_6.setBounds(149, 135, 80, 80);
      contentPane.add(label_6);
  
      label_7 = new JLabel("");
      label_7.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_7.setBackground(Color.WHITE);
      label_7.setBounds(239, 135, 80, 80);
      contentPane.add(label_7);
  
      label_8 = new JLabel("");
      label_8.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_8.setBackground(Color.WHITE);
      label_8.setBounds(329, 135, 80, 80);
      contentPane.add(label_8);
  
      label_9 = new JLabel("");
      label_9.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_9.setBackground(Color.WHITE);
      label_9.setBounds(329, 320, 80, 80);
      contentPane.add(label_9);
  
      label_10 = new JLabel("");
      label_10.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_10.setBackground(Color.WHITE);
      label_10.setBounds(59, 229, 80, 80);
      contentPane.add(label_10);
  
      label_11 = new JLabel("");
      label_11.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_11.setBackground(Color.WHITE);
      label_11.setBounds(149, 229, 80, 80);
      contentPane.add(label_11);
  
      label_12 = new JLabel("");
      label_12.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_12.setBackground(Color.WHITE);
      label_12.setBounds(239, 229, 80, 80);
      contentPane.add(label_12);
  
      label_13 = new JLabel("");
      label_13.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_13.setBackground(Color.WHITE);
      label_13.setBounds(329, 229, 80, 80);
      contentPane.add(label_13);
  
      label_14 = new JLabel("");
      label_14.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_14.setBackground(Color.WHITE);
      label_14.setBounds(239, 320, 80, 80);
      contentPane.add(label_14);
  
      label_15 = new JLabel();
      label_15.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_15.setBackground(Color.WHITE);
      label_15.setBounds(149, 320, 80, 80);
      contentPane.add(label_15);
  
      label_16 = new JLabel("");
      label_16.setIcon(new ImageIcon("C:\\Users\\Josh\\Desktop\\WHITE.png"));
      label_16.setBackground(Color.WHITE);
      label_16.setBounds(59, 323, 80, 80);
      contentPane.add(label_16);
  
      lblDodgeTheBombs = new JLabel("Dodge the bombs!");
      lblDodgeTheBombs.setForeground(Color.RED);
      lblDodgeTheBombs.setFont(new Font("Tahoma", Font.PLAIN, 25));
      lblDodgeTheBombs.setBounds(137, 418, 217, 33);
      contentPane.add(lblDodgeTheBombs);
  
      bomb1 = new Timer(1000, new TimerListener());
      bomb1.start();
  }
  private class TimerListener implements ActionListener {
      public void actionPerformed(ActionEvent e) {
          label_1.setIcon("C:\\Users\\Josh\\Desktop\\blank.png");
  
      }
  }
  
  }
  </code></pre>