AbsoluteNoob
AbsoluteNoob

Reputation:

Java Swing GUI theming

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

Upvotes: 4

Views: 3696

Answers (7)

svlada
svlada

Reputation: 3288

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

Upvotes: 2

hawkeye
hawkeye

Reputation: 35692

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)

Upvotes: 1

BCunningham
BCunningham

Reputation: 1048

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

Upvotes: 0

user34608
user34608

Reputation: 21

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.

Upvotes: 2

Rastislav Komara
Rastislav Komara

Reputation: 1721

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

Upvotes: 4

VonC
VonC

Reputation: 1323223

Sun provides an interesting introduction for creating a custom PLAF.

Upvotes: 1

Daniel Hiller
Daniel Hiller

Reputation: 3485

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

See this.

Upvotes: 1

Related Questions