title: Display an image in Java, taking the path from SQL database
body: <p>I have a Java program which should load an image from an SQL database and display said image on screen.</p>
  
  <p>The image path can be returned fine, as I have printed out the path returned. The image does exist in the correct path too.</p>
  
  <p>Now, I've tried hardcoding the path into the program and it prints the image fine, however, when loading the image using the path returned from the SQL database it won't load. </p>
  
  <p>The image path is "images\image1.jpg"</p>
  
  <p>Can you please tell me what the problem could be - thanks. </p>
  
  <pre><code>lblContent.setIcon(new ImageIcon("images\\test1.jpg"));
  </code></pre>
  
  <p>Hardcoded works fine ^</p>
  
  <pre><code>lblContent.setIcon(new ImageIcon(q2.get(6)));
  </code></pre>
  
  <p>Database retrieval does not ^</p>
  
  <p>Now, I did get this working once, but can't for the life of me remember it.</p>