L'unica cosa che ho trovato su JViewPort è questa frase
The JViewport provides a window, or "viewport" onto a data source -- for example, a text file. That data source is the "scrollable client" (aka data model) displayed by the JViewport view. A JScrollPane basically consists of JScrollBars, a JViewport, and the wiring between them, as shown in the diagram at right.
A common operation to want to do is to set the background color that will be used if the main viewport view is smaller than the viewport, or is not opaque. This can be accomplished by setting the background color of the viewport, via scrollPane.getViewport().setBackground(). The reason for setting the color of the viewport and not the scrollpane is that by default JViewport is opaque which, among other things, means it will completely fill in its background using its background color. Therefore when JScrollPane draws its background the viewport will usually draw over it.
Non capisco che differenza ci sia tra scrivere questo codice
JScrollPane editorScroll = new JScrollPane();
JViewport port = editorScroll.getViewport();
port.add(editor);
ed il codice
JScrollPane editorScroll = new JScrollPane(editor);
a cosa mi serve il JViewport?