Add JScrollPane to GUI Form

Answered

Hey everyone,

Being fairly new to Java & IntelliJ, I'm trying to scroll through a JTextPane. The solution appears to be creating a JScrollPane using my JTextPane as an argument. However, I have no idea how to do it using GUI Forms. I tried creating a JTextPane on which I use getDocument & such before instantiating the form created JScrollPane with said JTextPane, but it results in null pointer exception. I found another thread about the same subject ( https://intellij-support.jetbrains.com/hc/en-us/community/posts/206868135-Unable-to-use-scrollpane ) but couldn't figure out what steps to take to reach the given solution.

Sorry for my poor understanding of the GUI Forms, which is probably the problem here, and thanks in advance for any help.

Regards,

0

Please sign in to leave a comment.