title: Display local image (BufferedImage?) inside JTextPane
body: <p>I'm trying to display a local image in package1/package2/myImage.gif in a JTextPane. I first tried to load the resource into a BufferedImage:</p>
  
  <pre><code>BufferedImage image = ImageIO.read(ClassLoader.getSystemResourceAsStream(
      "package1/package2/myImage.gif"));
  </code></pre>
  
  <p>But then I didn't know how to use that in the setText method, so I tried just pointing to the image in a img-tag instead:</p>
  
  <pre><code>textpane.setText("Some text &lt;img src=\"package1/package2/myImage.gif\" /&gt;," +
      " and some more text");
  </code></pre>
  
  <p>This diplay a broken image when run. I'm pretty sure the path is correct, since loading it into the BufferedImage works. </p>
  
  <p>How can I use local resources like the image, along with other text, in a HTML-enabled JTextPane? </p>