Datamal Blog

Tuesday, May 02, 2006

Substance in NetBeans Swing not so with Eclipses SWT

You can do loads with the substance look and feel jar, which runs on top of Swing. Append it to your classpath and start playing around with laf and other custom command-line directives. This article makes a good start at showing what can be done.


Unfortunately, Eclipse cannot be made to do this because there is no literal "LAF" in Eclipse to change, as Eclipse does not use Swing, and LAF is a component of the window toolkit Swing. There are two ways to change colors / fonts / etc., the equivalent of LAF, in Eclipse:

  • via Eclipse preferences

  • or the host OS's display settings. Menu bar option Window -> Preferences -> General -> Appearance -> Color and Fonts can be used to individually tweak colors & fonts to each individual's likings.
The Eclipse options can be ported from installation to installation of Eclipse because preferences can be saved outside the IDE in a serialized file. These individual preferences for color, font, etc. do not need to be used, and can instead default to the OS's requested defaults. The OS display settings, when changed, apply to Eclipse automatically. This is because Eclipse is based on the native windowing toolkit SWT, and therefore respects / obeys the OS's requests for how it should display the IDE. This is opposed to Netbeans using Swing, a non-native windowing toolkit, that does not honor the requests of the OS on how the windowed application (Netbeans) should display. Therefore the proprietary display configuration, LAF, controls Netbeans.

0 Comments:

Post a Comment

<< Home