6.6.4. Cascading and Tiling

In Windows, there are standard commands for cascading and tiling windows (see Figures 6.49 and 6.50). The Java JDesktopPane and JInternalFrame classes have no built-in support for these operations. In Listing 6.31, we show you how you can implement these operations yourself.


Figure 6.49. Cascaded internal frames


Figure 6.50. Tiled internal frames

To cascade all windows, reshape windows to the same size and stagger their positions. The getAllFrames method of the JDesktopPane class returns an array of all internal frames. ...

Get Core Java® Volume II—Advanced Features, Ninth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.