Santy, Michael wrote:
> 
> I'm hosting XMLmind via WebStart and could not find a way to override
> the default look and feel.  I was able to do so in a standalone
> application, in which the default look and feel classname can be
> specified with the lookAndFeelClassName property in the
> preferences.properties file.  However, there seems to be no mechanism to
> pass this information into a WebStart application.  I even tried
> specifying the standard "swing.laf" property in the jnlp descriptor
> without success. 
> 
> I think that there are two ways to accomplish this, both requiring
> changes to the XXE distribution:
> 
> 1) Provide a means to specify that the preferences.properties is located
> inside of one of the jars packaged with the webstart app.  The
> XXE_USER_PREFERENCES only allows the specification of a filename, which
> cannot be known ahead of time in a webstart app.
> 
> 2) Have the WebStart class look for a XXE_LAF_CLASSNAME property
> specifying the look and feel classname.
> 
> Is there a simpler mechanism for specifying the default LAF in a
> webstart app?

Hussein Shafie wrote:
> No, there is no way to specify the LAF when XXE is deployed using Java
> Web Start.
> 
> We'll change that in next release and will allow to specify the LAF
> class name in a system property (either a ``standard'' one: swing.xxx or
> a proprietary one: XXE_LAF_CLASSNAME; don't know yet).
> 
> When this will be implemented, you'll have to specify this sytem
> property and its value in the jnlp descriptor.

I'm sorry: I got it all wrong!

Yes, there is a simple mechanism to force the  value of any user
preference (including lookAndFeelClassName) when XXE is deployed using
Java Web Start.

Example: Edit xxe.jnlp using a text editor and replace:

  <application-desc main-class="com.xmlmind.xmleditapp.start.WebStart"/>

by:

  <application-desc main-class="com.xmlmind.xmleditapp.start.WebStart">
    <argument>-putpref</argument>
    <argument>lookAndFeelClassName</argument>
    <argument>com.sun.java.swing.plaf.gtk.GTKLookAndFeel</argument>
  </application-desc>

Reply via email to