Code example for JScrollPane

Methods: setPreferredSizesetViewportView