Login  Register

Re: XP look&feel

Posted by ctrueden on Aug 29, 2005; 9:07pm
URL: http://imagej.273.s1.nabble.com/XP-look-feel-tp3704952p3704953.html

Hi Philippe,

ImageJ uses the AWT widgets available since Java 1.0. In Java 1.2, they
began packaging Swing (JFC), the next-generation toolkit, with a much
richer feature set. Unfortunately, the Look & Feel features are specific
to Swing. The old-style AWT widgets are unaffected by that setting.

To get ImageJ to appear with a different L&F, it would need to be
reworked to use Swing instead of AWT, a significant endeavor. I know
that people have modified ImageJ to use Swing instead of AWT in the
past. E.g.:
    http://lists.mindswap.org/pipermail/photostuff/2003-October/000041.html

However, I am not sure if any such version has been made publically
available online, nor whether they have been kept up-to-date with the
latest ImageJ releases.

Lastly, note that there was a brief discussion about the merits of AWT
vs Swing and related topics on the list back in April:
    http://list.nih.gov/cgi-bin/wa?A2=ind0504&L=IMAGEJ&D=0&I=-3&P=17874

-Curtis

Philippe Grosjean wrote:

> Hello,
>
> First, congratulations for this wonderful program to all who
> contributed to it!
>
> I start using and programming it (although I am *not* a Java
> programmer, I learn much with the macro recorder). I would like to run
> ImageJ under Windows XP with an XP look&feel. I read here
> (http://java.sun.com/docs/books/tutorial/uiswing/misc/plaf.html) that
> this is possible, starting from Java 1.4.2. However, I cannot manage
> to get this Win XP look&feel with ImageJ. I have tried:
> + the command line option:
> -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
> added to ImageJ.cfg
>
> + the 'swing.properties' file added to the /jre/lib subdir.
>
> + changing line 50 of Java2.java from
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> to
> UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
>
> and recompiling ImageJ.
>
> But I still got the old looking widgets. I tried ImageJ 1.35B with
> Java 1.5.0_04. I think these are the latest versions. I can manage to
> get a *partial* XP look&feel by adding a java.exe.manifest in the same
> dir as javaw.exe. However, buttons and checkboxes still keep the old
> look&feel, while other controls are OK.
>
> May be I don't understand when the Java2 class is called. Is JRE
> 1.5.0_04 considered as Java 2 or not?
>
> Thanks for the help,
>
> Philippe Grosjean
>
> ..............................................<°}))><........
>  ) ) ) ) )
> ( ( ( ( (    Prof. Philippe Grosjean
>  ) ) ) ) )
> ( ( ( ( (    Numerical Ecology of Aquatic Systems
>  ) ) ) ) )   Mons-Hainaut University, Pentagone (3D08)
> ( ( ( ( (    Academie Universitaire Wallonie-Bruxelles
>  ) ) ) ) )   8, av du Champ de Mars, 7000 Mons, Belgium
> ( ( ( ( (
>  ) ) ) ) )   phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
> ( ( ( ( (    email: [hidden email]
>  ) ) ) ) )
> ( ( ( ( (    web:   http://www.umh.ac.be/~econum
>  ) ) ) ) )          http://www.sciviews.org
> ( ( ( ( (
> ..............................................................
>