So I have a JScrollPane that I need to scroll (vertically only) through centered word-wrapping text. Behind the text should be a static, non-scrollable partially transparent image.
My first approach was to add the image to the JTextPane in the JScrollPane. This failed due to forcing the image to scroll out of where it exists.
My second approach was to make the JTextPane's background transparent and display the image behind the JTextPane on a JLabel. This failed due to the JTextPane's bacakground not being able to be transparent within the JScrollPane. -Now I could make it transparent, but it would leave behind corrupted, miscolored, and misplaced text along with the scrollbar randomly appearing over the JTextPane.
My third approach was using a JTextArea instead and displaying the image behind the it. This failed due to the JTextArea not being able to center text.
My fourth approach was to use a JLabel to display the text. This failed due to the JLabel not being able to word wrap. Although a few people seemed to have html fixes for this, none worked as they all wrapped at incorrect spots.
So I'm not sure what I should try next, any help is appreciated.