JAVA GUI UTIL LAF

back to JAVA projects back to JAVA gui-util projects

description
Utility project to simplify look and feel updates. This project won't be modified anymore (no more Swing :D ).

versions

 * 0.1 2012/10/28 first usable version, including LookAndFeelSetter only

dependencies

 * util-exception for error handling
 * SLF4J for logging

LookAndFeelSetter
The aim of this class is to wrap a call to UIManager.setLookAndFeel to :
 * ask the EDT to do the job (using SwingUtilities.invokeLater)
 * offer several error handling strategies

Usage :

LookAndFeelSetter.getInstance(errorHandlingStrategy).setLookAndFeel(lookAndFeelName)

The error handling strategy is used to specify the expected behavior in case an exception is thrown will setting the look and feel :
 * LOG : exception will be logged
 * THROW_EXCEPTION : exception will be logged, then wrapped in a LookAndFeelException (runtime exception) and rethrown
 * EXIT : exception will be logged, then System.exit will be called

back to JAVA gui-util projects back to JAVA projects