Here are some Swing links that you might have missed during this week:
- Alexander Potochkin shows how to use the new JXLayer to provide mouse auto-scrolling functionality. I have reviewed the available techniques in an earlier post, and this is yet another illustration of the capabilities of JXLayer.
- Jeff Friesen has an article that shows how use animated Windows cursors (in.ani format) in Swing applications. This builds on his previous article on extracting images from the Windows .ico files.
- Reginald Stadlbauer writes about the new release 3.4 of Squish automated GUI testing tool. View the release notes for the new functionality.
- Luan O’Carroll outlines his planned contributions to SwingLabs project. The contributions mainly focus on desktop publishing packages functionality, allowing support for different text flow modes.
- A new article on JavaSwing.net has a short overview on Swing threading and SwingWorker class.
- Finally, Alexey Utkin has released version 0.2.2 of JDICPlus that features native IDE drawing support for PDF, Microsoft Office (Word, Excel, Outlook) and Flash.
Ayman Al-Sairafi has a very useful project called JSyntaxPane which provides syntax highlighting capabilities for the JEditorPane Swing component, supporting Java, XML, Groovy and JavaScript. I’ve already mentioned this project on the latest “Swing links of the week”, and this week i’ve integrated it into the Rainbow SVG file viewer.
Rainbow is a testbed for integrating various desktop projects and building an SVG browser for both local and remote (SVN) repositories. Instead of reinventing the wheel, it uses third-party libraries for the various UI building blocks. Here is the list of the libraries:
- Apache Batik for parsing and transcoding the SVG format.
- Flamingo for the breadcrumb bar, command button and command button panel components.
- Substance for the look-and-feel.
- JXLayer for the spotlight search functionality and applying effects before saving as image.
- JHLabs filters for applying effects before saving as image.
- SVNKit for working with SVN repositories.
- FormLayout for the layout of the top bar and status bar.
- JSyntaxPane for highlighting the XML and Java2D content.
When you click on any SVG icon, Rainbow shows three views of that icon. The first view shows the original SVG XML content, the second view shows the transcoded Java2D class, and the third view allows applying a number of filters and save the image. The JSyntaxPane comes in handy for the first two views – Rainbow now shows the XML and Java2D content with applied syntax highlighting.
Here is a screenshot of the XML content (click for the full view):

and here is a screenshot of the Java2D class (click for the full view):

The JSyntaxPane is available under Apache 2.0 license.
Here are some Swing links that you might have missed during this week:
- Jacek Furmankiewicz has announced the first beta release 0.1 of his SwingBuilder project. It provide support for data binding with Beans Binding, layout management with MigLayout, validation with Apache Commons Validator, long running tasks with SwingWorker and has integration libraries for JIDE and SwingX.
- Maxim Zakharenkov has released version 1.2 of the Swing Explorer tool for debugging Swing applications. Eclipse support is a welcome addition, and in fact i would warmly recommend rewriting the entire UI as a collection of Eclipse views. In my experience, Eclipse is a great scaffolding for exactly this kind of information presentation, taking away a lot of implementation complexity and leaving you with implementing your actual logic. As long as you don’t fight it and try to go against the “Eclipse way” of doing things, you’ll find it a very mature and rich platform. In addition, learning another UI toolkit (SWT) is not a bad thing.
- Collin Fagan writes about using tooltips to show preview of tabs in a tabbed pane. Users of Substance look-and-feel had access to this functionality for quite some time now, and Collin shows how this can be done in a cross-LAF way.
- Ayman Al-Sairafi is working on the JSyntaxPane component that provides a text control with syntax highlighting for Java, Groovy, XML and JavaScript. It follows in the footsteps of jEdit Syntax package and Apache Batik XML editor kit (contributed by Kiyut) and is available under the Apache license.
- There’s a new Swing book out there! Tim Lavers and Lindsay Peters have written a book “Swing Extreme Testing” published by Packt Publishing. From the book site – This book is a practical guide to automated software testing for extreme Java programming using Swing GUIs, with lots of ready-to-use real-life examples and source code for automated testing of the software components usually regarded as too hard to test automatically.
- David Qiao and Wolfgang Zitzelsberger have announced integration between JIDE components and Synthetica look-and-feel.
- Richard Kennard has announced release 0.5 of the Metawidget project that takes domain objects in your applications and creates the UI widgets for them. It has support for SwingX, GWT, Groovy and applets.
- Andy Maleh introduces the Glimmer project that aims to create a JRuby DSL for creating cross-platform UIs with SWT.
- Peter Karich kicks off the series of articles on Spring Rich Client Project. Unlike server-oriented Spring projects, this has not seemed to receive nowhere as many resources to be actively targeting the major paint-points of rich client development. Answering the “when will 1.0 be released” with “when it’s ready” is not a good sign, and one of the commenters says that the plans are to rebrand it to Spring Desktop without “being bound to the current codebase”. If you’re planning to break backwards compatibility and have good reasons to do so – just say it as it is.
- David Qiao writes about adding arrow key support to the ButtonPanel component. Alexander Potochkin had a similar functionality in the JXButtonPanel a couple of years ago.
- Rajesh has a list of ten free docking frameworks for Java UI applications. One addition to the list comes from Davide Raccagni that has announced the new P74 graphical library. It contains a docking manager as well as a few other tools.
About a month ago i have introduced the new project named LightBeam that aims to assist look-and-feel writers to measure performance of their libraries under various static and dynamic scenarios. I have used this tool extensively during the performance optimizations of the next release of Substance look-and-feel, and it has now reached its first official release 1.0 code-named Antares.
The project distribution contains sample script files to test static and dynamic scenarios under the core look-and-feels (Metal, Windows and Nimbus), as well as a selection of active third-party look-and-feels (Substance, Looks and Synthetica). The performance spreadsheet available for download contains the breakdown of different scenarios, and here is the “executive summary” for the dynamic scenarios that try to emulate most common user interaction flows:
- 3,039 ms – Metal
- 3,721 ms – Windows
- 4,004 ms – Looks Plastic XP
- 4,696 ms – Nimbus
- 4,794 ms – Substance Autumn 5.0dev
- 4,908 ms – Synthetica default
- 13,146 ms – Substance Autumn 4.3
All the numbers are taken on my main development machine running the latest b26 of 6u10.