Background Image in JTextPane
- by Nivas
How do I set a background image to a JTextPane - some sort of a watermark.
I tried this option - creating a child class of JTextPane and use the paint method to draw the image.
But then the text is displayed "below" the image than above.
Is there any "standard" or "well known" way to do this?
(BTW, I tried (something silly?) making the content type "text/html", and setting the image as the background image of a <div> but it did not help.)