Pergunta

What are the differences between JScrollBar and JScrollPane?

Foi útil?

Solução

This image is self-explainatory

enter image description here

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.

JScrollPane api

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top