Re: Choosing default PLAF for SWIG

Vlastimil Babka <[email protected]> Wed, 23 Jan 2008 17:17:52 +0100
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
rozelak-VIXq6x/[email protected] wrote:
> Hallo,
> 
> I want to ask, if there is a way of choosing default Look&Feel for installed
> java. The default PLAF is Metal (javax.swing.plaf.metal.MetalLookAndFeel),
> but it does not look wery well ;-) How to tell java (using java-config?)
> to use GTK+ (com.sun.java.swing.plaf.gtk.GTKLookAndFeel), or others
> once installed, by default. I gues it must be configurable somewhere,
> but I don't think that java-config can handle it now. So, how to do
> it now, and will java-config support it in future?

http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html#commandLine

Looking at this, seems there's the command line param, and 
swing.properties in jdk's dir, which would need to be changed after each 
jdk reinstall though, some equivalent file in $HOME/.java or similar 
would be nice but I'm not sure there exists one.

Command line param should be somehow possible with gjl-based launchers 
for java applications installed through portage. The launcher will 
source files in /etc/java-config-2/launcher.d/$package and 
~/.gentoo/java-config-2/launcher.d/$package
(see /usr/share/java-config-2/launcher/launcher.bash)
Declaring something like gjl_args="-Dswing.defaultlaf=$foo" there should 
be eventually passed to the java process.

Won't affect running java manually though, and it's hacky. Certainly 
room for improvements, suggestions welcome.

> I am sorry if a similar qestion was already answered, but there is no
> way of searching in the mailing list (except going through all the messages)

I think gmane.org can search through archives of mailing lists including 
this one, but I don't recall such question myself.

> P.S. mabye one more little question: is gentoo going to support opensourced
> java, once suitable for use? I mean download sources and compile all
> from scratch?

Sure, one day :) openjdk builds are available in java-experimental 
overlay, but it's time-consuming to maintain them and we could surely 
use more people dedicated to that...

Caster
-- 
[email protected] mailing list