title: Write text into a JTextPane with an image background
body: <p>I have a JTextPane with an image for its background.</p>
  
  <pre><code>prevWords = new JTextPane()
      {
          public void paint(Graphics g)
          {
              BufferedImage img;
              try 
              {
                  img = ImageIO.read(new File("Images/logo.png"));
                  img.getGraphics().setColor(new Color(Color.TRANSLUCENT));
                  g.drawImage(img, 0, 0, null);
              } 
              catch (IOException e) 
              {
                  System.out.println("Failed to load logo.");
              }
              super.paintComponents(g);
          }
      };
  </code></pre>
  
  <p>When I write text to the the pane, it I cannot see it.  I have set the text in pane to be white as well.</p>