Browse Prior Art Database

Detachable and Resizable Applet Panel

IP.com Disclosure Number: IPCOM000127351D
Original Publication Date: 2005-Aug-25
Included in the Prior Art Database: 2005-Aug-25
Document File: 3 page(s) / 82K

Publishing Venue

IBM

Abstract

A program is disclosed that enables a panel from a Java* Applet running in a WEB browser to be detached, resized and then reattached automatically to its original position.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 3

Detachable and Resizable Applet Panel

The Swing classes' pluggable L&F aspect is explored. A Java Swing javax.swing.JToolbar.java class is used as the basis for the detachable panel. This class originally does not allow for resizing only detaching. In order to achieve the resizing capability as well, two additional classes are used: MyBasicToolBarUI and MyMetalToolBarUI.

MyMetalToolBarUI class descends from MyBasicToolBarUI which derives from javax.swing.plaf.ComponentUI.

Figure 1 shows a class diagram that illustrates the cited relationships.

Figure 1 - Custom classes' hierarchy

MyBasicToolBarUI overrides the method JFrame createFloatingFrame(JToolBar toolbar) to return a resizable javax.swing.JFrame. This is the key to get the proposed behavior.

The client applet should call the setUI() method from the JToolbar instance passing a MyMetalToolBarUI instance in order to register it. The final result is a detachable and resizable JToolbar.

1

[This page contains 1 picture or other non-text object]

Page 2 of 3

Listing 1, 2 and 3 show the Java source code for the classes mentioned above.

2

[This page contains 1 picture or other non-text object]

Page 3 of 3

*Trademark of Sun Microsystems

3

[This page contains 2 pictures or other non-text objects]