The reason is this Line:
jep.setBounds(100, 50, 150, 100);
You have set the bounds for JEditorPane
but now you have added that JEditorPane
to the JScrollPane
. So instead of setting bounds for JEditorPane
you should have use setbounds
for JScrollPane
.
This all was about the reason for not showing up the JEditorPane. But Now here a serious suggestion for you: The use of setBounds are highly discouraged. You should use inbuilt layouts for aligning components in Swing. Java AWT and Swing has provided lot of useful layouts for such task . Look at A Visual Guide to Layout Managers to know about how to use these layouts.