14.14. Summary

This chapter introduced many of the standard Swing components that map to the familiar AWT components, including JLabel, JButton, JSlider, JPanel, JApplet, and JFrame, plus some new components like JColorChooser, JOptionPane, and JInternalFrame not seen in the AWT. Except for the windowing components, Swing components are all lightweight and drawn completely to memory through Java code. Instead of adding components to windows directly, you add components to the content pane. The content pane in JFrame and JApplet is simply a JPanel that by default implements double buffering. JFrame and JApplet now default to the same layout manager, BorderLayout.

As seen, Swing components are very rich and exciting, adding the capability for a ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.