If you are the developer or it's an open source, an alternative way is to change the look and feel of the application. Insert the below code in the main method.
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("com.sun.java.swing.plaf.gtk.GTKLookAndFeel".equals(info.getClassName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
You can try to set Java's default look and feel to GTK:
Open a terminal ( Ctrl + Alt + T ) and paste the upper one for openjdk and the lower one for sun java .
gksu gedit /usr/lib/jvm/java-6-openjdk/jre/lib/swing.properties
gksu gedit /usr/lib/jvm/java-6-sun/jre/lib/swing.properties
Follow the comment in that file and remove the hash sign, so it looks like:
Save and restart the java app.
Before and after:
If you have already tried the above solutions - try using this (helped me on Xfce):
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
Then launch in this terminal your app.
~/.profile
file.If you are the developer or it's an open source, an alternative way is to change the look and feel of the application. Insert the below code in the
main
method.This might be also helpful.