rkcole.com
Swing Issues and Examples
I once wrote an HTML custom-tag editor that required that a dialog box pop-up in response to a click on one of the hyperlinks. Here's the technique that I developed to accomplish that task.
The trick to synchonizing two JScrollPanes to a single JScrollBar is to synchronize their JScrollBar data models. This example should be adaptable to JSliders and JProgressBars.
Ever wanted to have a Kiosk-style JFrame running in full screen without a menu or title bar? You can do it by removing all decorations from the frame and setting its size to the screen size like this:
This example application illustrates a technique for sharing actions between JToolBars, JMenuBars and JPopups.
You can use the swing text package to parse HTML documents. Here is an example that parses a webpage and prints all the IMG tags to standard out.
How do you access the title of an HTMLDocument? Here's a hint: HTMLDocument stores the title as a property.
Here is a simple recursive method for traversing a JTree and printing all the leaf nodes.