JScrollPane, ScrollPane


In many cases, AWT components pop up their own scroll bars if their content needs to scroll. An AWT ScrollPane is available, though, to add scrolling where it is needed. Swing components, however, must be added to a JScrollPane if the content is to scroll. This document will not cover other differences between ScrollPane and JScrollPane. See the Java reference materials and tutorials for these particular classes. We will discuss JScrollPane as it is more frequently needed (and it is generally preferable to use Swing components).

To use a JScrollPane, choose it from the Component Palette and click on the Form Editor window. Then select the component to be added from the Palette to the JScrollPane and then click on the JScrollPane.

Remember that you can still select the underlying JScrollPane (for instance, to set its scrolling properties) by clicking on its entry in the Component Inspector.


Contents Prev Next Index