views:

886

answers:

7

Is it possible to develop custom PLAF themes for Swing? I would appreciate constructive suggestions in this topic Thanks

+1  A: 

Infonode provides a framework for developing new look and feels. They have a GPL'd library which you can use.

See this.

dhiller
+1  A: 

Sun provides an interesting introduction for creating a custom PLAF.

VonC
+4  A: 

Yes! But don't do that. If you need just change colors. Try JGoodies or Substance and obey writing your own PLAF.

Rastislav Komara
+1 for JGoodies
Tim Büthe
+2  A: 

It depends on what you exactly want to do. Writing you own LAF extending from Java Basic or Metal it is a lot of work, but it can be done. If you have some special aims such e.g. painting a gradient background for Jtrees or highlightin animation it will get tricky, but this can also be done. It is also very helpful to download open source LAFs for swing and have a look at the source code, to learn how to write your own PLAF. Please have a look here.

A: 

It is possible to create a custom PLAF using the built-in Synth Look-and-Feel. It's basically a PLAF that allows you to customize the appearance of all components (or just specific ones via component naming) via an XML configuration file. The [javax.swing.plaf.synth][1] package JavaDoc gives a good overview of what's possible, and there is additional documentation linked to in the JavaDocs for using this PLAF.

I've used this in my own projects before and it's very easy to work with. You can use your own custom graphic images for all components, and can customize pretty much anything you want without having to go through all that cumbersome custom coding that used to be necessary to make a PLAF

BCunningham
+1  A: 

If you want to customise the Swing Look and Feel - look beyond the PLAF to libraries like FUSE. This is next-gen swing look and feel customisation.

Here are some screenshots: http://www.curious-creature.org/2006/02/12/fuseswing-demo/

Here is the library: https://fuse.dev.java.net/

This is something written that has used it: https://aerith.dev.java.net/ (Also with some great screenshots)

hawkeye
+2  A: 

Try java substance
https://substance.dev.java.net/see.html

svlada