The toolbar contents automatically size to fit as you add or remove buttons. When internal frames are positioned outside the virtual desktop's boundary, scroll bars update to provide access to the cropped internal frames, solving the clipping problem.Ī toolbar provides a lengthwise set of toggle buttons above the virtual desktop, with each button mapped to a corresponding internal frame. The virtual desktop comprises the main display area. Click on thumbnail to view full-size image. The JScrollableDesktopPane class in action. As Figure 2 shows, JScrollableDesktopPane involves three main subcomponents: a virtual desktop, a toolbar, and a menu. Figure 2 depicts the scrollable desktop pane in action. The JScrollableDesktopPane class presented in this article offers a solution to the aforementioned clipping and overlap problems, and mimics the interface of the original JDesktopPane class in order to easily upgrade your application. ![]() This work becomes tedious if several internal frames overlap, as is possible in any MDI environment. Should internal frames obscure one another, the user must drag each frame aside before the next one becomes accessible. JDesktopPane's second limitation is that it doesn't provide a simple method to switch between internal frames instead, you must click upon the frame title bar. Internal frame clipped by the virtual desktop. Needless to say, such actions are not conducive to navigability and usability. This clipping, demonstrated in Figure 1, exemplifies one of JDesktopPane's inherent limitations: a user cannot view an internal frame's hidden portion without dragging the frame back within the virtual desktop boundary, or resizing the JDesktopPane container itself. JInternalFrame's various child windows or internal frames populate this desktop, and because those frames are internal, they are clipped at the boundary of the JDesktopPane container class (as opposed to JFrame's external frames, which are painted without regard to container boundaries). The JDesktopPane class, first introduced in JDK 1.2 as a subsidiary to Swing's GUI component series, lets you create a virtual desktop or Multiple Document Interface (MDI) in Java applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |