O'Reilly logo

Filthy Rich Clients: Developing Animated and Graphical Effects for Desktop Java™ Applications by Romain Guy, Chet Haase

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 10. Layered Panes

THE glass pane offers numerous possibilities when it comes to creating advanced user interfaces. However, it suffers from two annoying limitations:

1. You can set up only one glass pane at a time on a given frame. While one is enough in most cases, you might encounter situations in which you need two or more glass panes to paint several effects on the user interface. Things get even worse when the glass pane is set up by code you have no control over, like an external Java library.

2. A glass pane must also cover the entire frame, which makes it difficult to write custom glass panes that paint on top of a particular component or set of components.

Fortunately, Swing offers a solution to this problem with the JLayeredPane ...

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