O'Reilly logo

Java Swing, 2nd Edition by Brian Cole, James Elliott, Marc Loy, Robert Eckstein, Dave Wood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 26. Look and Feel

In Chapter 1, we introduced the concept of Swing’s Pluggable L&F ( PLAF) architecture. In this chapter, we’ll get into a variety of topics related to PLAF. The chapter includes:

  • A discussion of the default L&F presented to users on different platforms, and the trade-offs involved in changing it for your application

  • An overview of how the Swing component classes work together with the UI-delegate classes

  • A detailed explanation of the various PLAF-related classes in the javax.swing package, as well as some of the important classes and interfaces from javax.swing.plaf

  • An explanation of how PLAF fits into JFC’s accessibility framework using MultiLookAndFeel.

  • Detailed discussions of strategies for customizing the L&F of your applications using the following techniques:

    • Modification of specific component properties

    • Modification of resource defaults

    • Use of themes in the Metal L&F

    • Use of customized client properties in the Metal L&F

    • Replacement of specific UI delegates

    • Creation of a new L&F from scratch

This chapter contains a lot of technical detail. You can do a lot with Swing’s PLAF architecture without understanding everything we cover here. If you’re interested in customizing the L&F of your applications, but don’t mind if there are a few things that don’t quite make sense, you can skim the next few sections and jump right into Section 26.6. If you want to understand exactly how everything works, read on.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required