Swing links of the week: October 5, 2008

October 6th, 2008 | 4 Comments »

Here are some Swing links that you might have missed during the last week:

  • The results for OpenJDK Community Innovators’ Challenge are in. Congratulations to Clemens Eisserer for the Gold on his XRender pipeline for Java2D, and to Roman Kennke / Mario Torre for the Bronze on their portable GUI backends.
  • Ken Orr has announced release 0.9.2 of the Mac Widgets for Java library. Two biggest additions in this release are Heads Up Display and refactored UI delegate for source lists.
  • Jean-Francois Poilpret continues his work on imporving the DesignGridLayout, writing about right-to-left (RTL) support. He tackles an interesting issues of languages with vertical orientation, asking for user help in testing the latest drops on Japanese / Chinese (vertical right-to-left) and Mongolean (vertical left-to-right).
  • David Qiao has announced the first release of JIDE Data Grids product that aims to bridge the gap between the Database and the JTable.
  • Christophe Le Besnerais continues his explorations of modern Swing interfaces. Combining a horizontally wrapping list with a JXLayer for mouse area selection, he presents a folder-like view with resizable flowing content.
  • Richard Kennard has announced release 0.6.0 of the Metawidget library. New in this release – support for AppFramework, JBoss jBPM, JEXL and improved support for GWT and Android.
  • Manuel Kaess extends his work on Vista-consistent Swing utilities to the message dialogs. Comparing the appearance of native Vista dialogs with the JOptionPane ones, he provides a custom implementation that follows the UX guidelines for Vista message boxes.
  • Martin Kaba writes about the MozSwing project that aims to integrate Mozilla’s XUL framework with Swing. The advantage in using the MozSwing approach is that, you have both rendering and scripting access from a Swing application to almost any XPCOM components that can be embedded in a Mozilla browser – browser plugins. MozSwing plays Flash right out of the box, if flash is installed for Firefox.
  • Fifesoft are the makers of RText text editor. This week, they have announced the creation of RSyntaxTextArea open-source project that can be used as a standalone syntax highlighting text component for Swing applications. It supports syntax highlight for 20+ languages, find / replace, macros, code templates, bracket matching and more.
  • Ken Orr attacks the problem of JTable-in-a-JViewport and not filling the entire viewport. His solution employs a UI delegate that installs a custom layout manager on the enclosing viewport.

Finally, Jonas Bandi points to a gem in the Sun Certified Enterprise Architect exam preparation materials from the Sun Learning Center. The question is this:

You are architecting a real-time system with high usage and high volumes of transactions. You need an MVC application with quick presentation times resembling a thin client and will have several pre-populated views that can carry across several pages. The users must be able to quickly navigate between different sections of the system. Which three technologies will you need to implement? (Choose three.)

  • A) MDB
  • B) Swing GUI controls
  • C) JSP
  • D) EJB3 Entities
  • E) Stateless Session Beans
  • F) JCE

The solution – Options C, D, E are correct. What about Option B (Swing)?

Option B is incorrect because swing components are notoriously slow.

With such friends, who needs enemies?


4 Comments on “Swing links of the week: October 5, 2008”

  1. 1 Nitin said at 11:49 pm on October 6th, 2008:

    Hi !
    DesignGridLayout vs Mig Layout ..would be interesting comparison now that later is a RFE !

  2. 2 Richard said at 6:52 am on October 7th, 2008:

    Nice catch with the architect exam question – made me smile at least.. wouldn’t the correct answer depend very much on the resources and skills of the developers to hand and the external interfaces it needed to interoperate with..

    Although I’d prefer to see “Option B is correct because swing opponents are notoriously slow.”

  3. 3 Andy said at 12:06 pm on October 10th, 2008:

    Hi,

    I tried Substance LAF with my own rather complex application. It works with all other LAFs but throws the following exception with Substance. Any clue what is going on?

    Exception in thread “AWT-EventQueue-0″ java.lang.ClassCastException: javax.swing.plaf.metal.MetalRootPaneUI cannot be cast to org.jvnet.substance.SubstanceRootPaneUI
    at org.jvnet.substance.utils.SubstanceCoreUtilities.getTitlePane(SubstanceCoreUtilities.java:2135)
    at org.jvnet.substance.painter.decoration.ImageWrapperDecorationPainter.paintExtraBackground(ImageWrapperDecorationPainter.java:194)
    at org.jvnet.substance.painter.decoration.ImageWrapperDecorationPainter.paintDecorationArea(ImageWrapperDecorationPainter.java:118)
    at org.jvnet.substance.painter.decoration.SubstanceDecorationUtilities.paintDecorationBackground(SubstanceDecorationUtilities.java:230)
    at org.jvnet.substance.painter.decoration.SubstanceDecorationUtilities.paintDecorationBackground(SubstanceDecorationUtilities.java:190)
    at org.jvnet.substance.painter.utils.SubstanceFillBackgroundDelegate.update(SubstanceFillBackgroundDelegate.java:145)
    at org.jvnet.substance.SubstanceMenuBarUI.update(SubstanceMenuBarUI.java:96)
    at javax.swing.JComponent.paintComponent(JComponent.java:763)
    at javax.swing.JComponent.paint(JComponent.java:1027)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
    at javax.swing.JComponent.paintChildren(JComponent.java:864)
    at javax.swing.JComponent.paint(JComponent.java:1036)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
    at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
    at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
    at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

  4. 4 Kirill Grouchnikov said at 9:31 pm on October 10th, 2008:

    Andy,

    That would usually indicate that you’re setting Substance inside the constructor of your frame / dialog. Move the UIManager.setLookAndFeel call into your main method *before* creating your first window. If the problem persists, please use the project tools such as mailing lists and forums.

    Thanks
    Kirill