JEditorPane and JTextPane

JEditorPane is the right component to display HTML-, RTF- or plain text files whereas JTextPane renders a StyledDocument. What they have in common is, they don't have a (reliable) preferred size.As a consequence, you should add JEditorPane and JTextPane to a JScrollPane and set the scroll pane's preferredSize property.

As you insert a JEditorPane or a JTextPane into a layout, RADi automatically creates a scroll pane for the text component and inserts the scroll pane (the only exception is when you add a JEditorPane or a JTextPane directly to a scroll pane). The scroll pane's preferredSize property is set to Dimension(160,120).
JEditorPane inside a JScrollPane  Ex 20
Note: The content of a StyledDocument can not be internationalized. The page property of JEditorPane (which references the displayed document) can be internationalized (see Internationalization).