Menu

Using Joxy - Other OS

Willem3141 Thom Castermans
Instructions for Windows or Mac (to choose another system: [Using Joxy])

Since Joxy 0.1.0, the look-and-feel will probably work on other operating systems than Linux. We performed some quick testing on Windows, and there only were some problems because there were missing icons. If you want to try it you can follow the steps below.

Getting Joxy

You should first get Joxy, in either one of the following ways:

  • Downloading the .jar file from the Downloads section above. This is the jar-file in the zip-file we offer as default download.
    There is also an 'so-file', which you can ignore. It is intended for native textrendering on Linux and not intended for use on a non-Linux operating system.
  • Compiling it yourself (see [Downloading the source] and [Compiling the source] for instructions).

Note: We did not test the compilation process on Windows or Mac. Therefore we recommend the first option.

Note: The native text rendering will not work on Windows and Mac. However it is not needed there since the Java text rendering is already very good on those platforms.

Installing

You should put the .jar file that you obtained in the Java class path. This can be done either with the -cp switch, and by putting it in the /lib/ext folder of your Java Runtime Environment (JRE). Because the first option is very error-prone, we recommend the latter option.

Dependent on the details of your Java installation, on Windows you can find the /lib/ext folder in a path like C:/Program Files/Java/jre6.

To do: add details for Mac

Applying Joxy to a program

You can apply Joxy to a program in multiple ways.

  • Using a command line switch. You can use the command line option -Dswing.defaultlaf=joxy.JoxyLookAndFeel when starting the application to switch the look and feel to Joxy. For example:

    java -Dswing.defaultlaf=joxy.JoxyLookAndFeel -jar someprogram.jar

  • An application-specific way. Some programs set their own look and feel, and overwrite your command line options. An example is NetBeans. To use Joxy on NetBeans, use the -laf option that NetBeans provides itself.

  • Programming it in your application. If you want, you can provide your own applications with the Joxy Look and Feel. This can be done with

UIManager.setLookAndFeel("joxy.JoxyLookAndFeel");

and putting the Joxy JAR file in the class path.

Advanced

If you want to use Joxy on all Java programs, you can use the Swing defaults file. This file is called swing.properties and it resides in the lib subdirectory of your Java installation directory. If the file does not exist, you can create it. Now you can add lines in this file of the format

setting=value

where setting is one of the following.

  • swing.defaultlaf sets the default LAF to the given value. That is, if a program does not ask to set the LAF, it will use this setting. For example,
swing.defaultlaf=joxy.JoxyLookAndFeel
  • swing.systemlaf sets the system LAF to the given value. That is, if a program asks Java to use the native system LAF, it will use this setting. This does not make very much sense on Windows, but it can be used to force certain programs to use Joxy. For example,
swing.systemlaf=joxy.JoxyLookAndFeel
  • system.installedlafs lets you set the list of LAFs that Java knows that are available. This works a bit different than the first two options. Programs are able to ask Java which LAFs are installed. This way, they can create a list of LAFs, for example in a menu, so that the user can choose one of them. By using this setting, you can make Java aware that the Joxy LAF is available. The problem is, if you use this setting, you will override any LAF that was in this list by default. So you will have to enumerate all LAFs and appending Joxy, for example as follows:
swing.installedlafs=metal,nimbus,motif,joxy
swing.installedlaf.metal.name=Metal
swing.installedlaf.metal.class=javax.swing.plaf.metal.MetalLookAndFeel
swing.installedlaf.nimbus.name=Nimbus
swing.installedlaf.nimbus.class=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
swing.installedlaf.motif.name=CDE/Motif
swing.installedlaf.motif.class=com.sun.java.swing.plaf.motif.MotifLookAndFeel
swing.installedlaf.joxy.name=Joxy
swing.installedlaf.joxy.class=joxy.JoxyLookAndFeel

Related

Wiki: Compiling the source
Wiki: Downloading the source
Wiki: Using Joxy

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.