New Swing skin
Hello,
I've been checking out how to insert a new skin for my applicationclient but I can't really seem to figure out how it all works. I've downloaded a folder containg a new skin but how do I implement it in my application?
Furthermore, how do I get Netbeans to work with it? This is really puzzling me and it would be nice if I could do this.
[367 byte] By [
rockarenaa] at [2007-11-27 6:26:16]

# 1
i guess you are talking about the look & feel of the swing application. If i am correct , check this URL http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html
# 2
Yes that's it, I've already been through that page but I can't figure out how to do it in Netbeans.
# 3
check this http://www.netbeans.org/kb/41/substance-look-and-feel.html
# 4
I hope this will be a solution for your question http://java.sun.com/docs/books/tutorial/uiswing/examples/lookandfeel/index.html
# 5
It seems i f I want a custom L&F for my application I have to use the command line everytime I want to do this. Otherwise it will run with the default L&F. I want to create a jar and when I startup the jar by clicking on it my default look & feel should be used. this has probably something to do with UI manager I think?
So with Ui manager it is but I still don't get teh command console thingie. I'm going to use it for a EJB project, so for my appclient.
Message was edited by:
rockarena
# 6
> It seems i f I want a custom L&F for my application I
> have to use the command line everytime I want to do
> this. Otherwise it will run with the default L&F.
No, you don't have to use the command line to change the L&F, but you can change it via the command line (which is a Good Thing when you want to change the L&F without twiddling the code).
You can also change the L&F programmatically in your source code (which is again a Good Thing when you want a fixed L&F that cannot be changed via the command line). And you can also change the L&F on the fly after your whole GUI is shown on the screen (which is a third Good Thing for obvious reasons).
How this is done is really explained in the links posted above. Basically, in order to change the L&F in your source code, you use either one of the two setLookAndFeel() methods in the UIManager class (see the javadoc of that class for more info). You need to do this either very early in your boot process, or, if you change the L&F later with the GUIs already loaded, then you need to call SwingUtilities.updateComponentTreeUI() with your root container as an argument.
Greets,
Mike
MikePa at 2007-7-12 17:46:57 >

# 7
I already got that but I can't test it here so I'm gonna wait untill tonight to get back at you guys. I think that all I have to do is import the package with new L&F into my appclient folder and then call it in my source code. that's it I think.
# 8
So I tried out; All I had to do was import the substance pakacge into netbeans. Only thing I can't figure out now is the difference between skins and themes and watermarks.
# 9
> Only thing I can't
> figure out now is the difference between skins and
> themes and watermarks.
In Java (more precisely: Swing) terminology, there is no "skin". The only thing about customizing the visuals that Swing has a notion of, is called "look and feel". It is not just a "skin" because it is designed to customize not only the appearance, but also the behavior (thus the "feel" part) of GUI components.
So from a Swing point of view, there's just different L&Fs and nothing more.
Now, Swing's standard cross-platform L&F (called "Metal") is implemented in such a way, that it permits you to change the color schemes of the components. These schemes are called "themes". They are really only about changing colors, the fundamental look of the components and their behavior is the same across themes. In a way, themes are a subset of a L&F allowing you to change only a small part of the things you can customize with a L&F. The principal difference between a L&F and a theme is that support for L&F is a feature of the Swing framework, whereas themes are a feature of a specific L&F (the metal L&F) for Swing. By far not all Swing L&Fs support themes (in fact, Metal is the only one I know of that does).
Watermarks are kind of like themes - they are another specific feature of some particular L&F, in this case the Substance L&F. Watermarks are Substance's term for background images and pseudo-transparent components on top of those images (someone correct me if I'm wrong here). In any case they have nothing to do with Swing itself.
Hope this clears some things...
Greets,
Mike
MikePa at 2007-7-12 17:46:57 >

# 10
> So I tried out; All I had to do was import the
> substance pakacge into netbeans. Only thing I can't
> figure out now is the difference between skins and
> themes and watermarks.
If you have Substance-specific questions, ask them at the project forums and mailing lists - this way you'll get the answers much faster. On the main project page, there's plenty of links to documentation on Substance themes, watermarks and skins. Have you read those? Are they not clear enough, or don't provide enough information? If so, post a forum message or write an e-mail to the users list (register as a project Observer first).
Kirill (Substance developer).