You never add the JEditorPane
to a JScrollPane
. Text components don't have scroll support by themselves.
Try using window.add(new JScrollPane(web));
instead
Take a look at How to use scroll panes for more details
ps- web.setBounds(rweb);
will only work if you are using a null
layout and if you are, you'd be better of using a EmptyBorder
or a layout manager that provided the ability to specify insets, like GridBagLayout