CHAPTER 2

image

Swing Components

In this chapter, you will learn

  • What Swing components are
  • Different types of Swing components
  • How to validate input in a text component
  • How to use menus and toolbars
  • How to edit tabular and hierarchical data using JTable and JTree components
  • How to use custom and standard dialogs
  • How to customize a component’s properties such as colors, borders, fonts, etc.
  • How to paint components and how to draw shapes
  • Immediate painting and double buffering

What Is a Swing Component?

Swing provides a huge set of components to build GUIs. In Java programs, a Swing component is an instance of the JComponent class. The JComponent class ...

Get Beginning Java 8 APIs, Extensions and Libraries Swing, JavaFX, JavaScript, JDBC and Network Programming APIs 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.