The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases.
How to Use Various Components
Each of the following pages describes how to use a particular kind of Swing component.