Synth Look and Feel - Example

Example

The following XML declaration defines a style named textfield and binds it to all text fields. The defaultStyle allows to set a default font, foreground and background colors to all other widgets.

Supposing that the XML declaration is defined in a file named synthExample.xml, the following code loads the XML definition file and sets the current look and feel to synth (loading a synth Look and Feel is done using the load method of the SynthLookAndFeel class):

SynthLookAndFeel laf = new SynthLookAndFeel; laf.load(new File("synthExample.xml").toURL); UIManager.setLookAndFeel(laf);

Read more about this topic:  Synth Look And Feel

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)