You are not logged in.

#1 2013-12-31 14:12:56

2mac
Member
Registered: 2013-11-09
Posts: 95

[SOLVED] XFCE - Java Swing button theme?

I'm running XFCE, and I notice that all Swing-based Java applications use the ugly Swing button theme. When I used GNOME 3, some of them would adapt to the GNOME button theme (and would look like they belonged on the system).

Is this issue with XFCE, my current GTK theme (dorian), or Java, and how can I change this?

Last edited by 2mac (2014-01-01 22:17:07)

Offline

#2 2013-12-31 14:41:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: [SOLVED] XFCE - Java Swing button theme?

Have you set the GTK look and feel?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-12-31 16:35:08

2mac
Member
Registered: 2013-11-09
Posts: 95

Re: [SOLVED] XFCE - Java Swing button theme?

Thank you for the information.

I followed the wiki by adding

export _JAVA_OPTIONS="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"

to my ~/.bashrc file.

To test, I launched the Minecraft launcher (one of the applications which does support style changes between desktops), and got back this information:

Picked up _JAVA_OPTIONS: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
Error parsing gtk-icon-sizes string: ''

And it had no effect. Any ideas?

Last edited by 2mac (2013-12-31 16:35:39)

Offline

#4 2014-01-01 19:48:11

2mac
Member
Registered: 2013-11-09
Posts: 95

Re: [SOLVED] XFCE - Java Swing button theme?

Is this an issue with my GTK theme or with the way I passed the option?

Offline

#5 2014-01-01 20:21:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,545
Website

Re: [SOLVED] XFCE - Java Swing button theme?

I'm not really sure where to go next.  That error message makes it clear the option is properly being picked up, and does seem to suggest that the GTK theme may be missing something, but I'm not too familiar with theming java/swing.  Have you tried other gtk themes?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2014-01-01 20:30:55

rainbowdashc
Member
Registered: 2013-09-30
Posts: 70

Re: [SOLVED] XFCE - Java Swing button theme?

Try using '-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel' instead; pretty much every Swing application I launch will give the "parsing gtk-icon-sizes string" error but appears correctly so I generally ignore it.

Offline

#7 2014-01-01 22:16:55

2mac
Member
Registered: 2013-11-09
Posts: 95

Re: [SOLVED] XFCE - Java Swing button theme?

Resolved. Thank you very much.

Offline

#8 2014-07-22 21:06:56

baronleonardo
Member
Registered: 2014-01-05
Posts: 10

Re: [SOLVED] XFCE - Java Swing button theme?

@rainbowdashc
This is not working for me .. This works
" -J-Dawt.useSystemAAFontSettings=on -J-Dswing.aatext=true -J-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -J-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel "

Last edited by baronleonardo (2014-07-22 21:07:42)

Offline

Board footer

Powered by FluxBB