Categories
How-To's

How to make Bleezer look good

Like I posted in a previous entry, I hate the way Bleezer looks on linux. The screenshots look great but I guess the author is using MacOS.

Personally, I like the Substance Look and Feel, even if its a bit heavy to render (the GUI gets a little sluggish if the windows get complex). I downloaded the 4.3 release from the Substance site and used the docs to figure out what argument to feed Java.

Note that Substance has multiple skins, all are a little bit different from eachother. This is why the Substance package has multiple classes you can select for the L&F.

Back to Bleezer. I tried making Bleezer use the Substance L&F by means of the command line. Something like this was supposed to work:

java -Dswing.defaultlaf=org.jvnet.substance.skin.SubstanceBusinessLookAndFeel -cp .:substance.jar -jar Bleezer.jar

However, it did not. For some reason you get this:

Exception in thread "main" java.lang.Error: can't load org.jvnet.substance.skin.SubstanceBusinessLookAndFeelat javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1337)at javax.swing.UIManager.initialize(UIManager.java:1418)at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)at javax.swing.UIManager.getUI(UIManager.java:1003)at javax.swing.JPanel.updateUI(JPanel.java:109)at javax.swing.JPanel.<init>(JPanel.java:69)at javax.swing.JPanel.<init>(JPanel.java:92)at javax.swing.JPanel.<init>(JPanel.java:100)at javax.swing.JRootPane.createGlassPane(JRootPane.java:527)at javax.swing.JRootPane.<init>(JRootPane.java:347)at javax.swing.JFrame.createRootPane(JFrame.java:260)at javax.swing.JFrame.frameInit(JFrame.java:241)at javax.swing.JFrame.<init>(JFrame.java:164)at com.bleezer.Bleezer.<init>(Bleezer.java:112)at com.bleezer.Bleezer.main(Bleezer.java:1556)

After trying a million tests to make sure the JAr file was included I finally ran a decompiler over Bleezer and it looks like Bleezer will only attempt to set the L&F on Windows and MacOS. This means the linux users are stuck with the Metal L&F and Bleezer does not provide an option to change the skin.

In a previous post I showed how you can override the L&F for Bleezer using the command line. For some reason, that same trick won’t work here so we’ll work around it.

The solution is to add the Bleezer JAR to the class path and then manually specifiy which class should be run. Using this trick, you can make Bleezer use the new L&F.

Putting it all together you could make a launch script to fire up Bleezer using the new Look and Feel:

#!/bin/bashjava -Dswing.defaultlaf=org.jvnet.substance.skin.SubstanceBusinessLookAndFeel -cp .:substance.jar:Bleezer.jar com.bleezer.Bleezer

And here is the end result, before:

…and after:

Technorati: