Skinning Java desktop applications?

[亡魂溺海] 提交于 2020-01-01 05:28:05

问题


Does anybody know a way to "skin" Java desktop applications. (Like Winamp skins, or skins for MirandaIM)? I don't want to create my own look and feel.


回答1:


Yes, there are a few ways this can be done, but I don't know anyone that is really simple. Have a look at Nimbus: The New Face of Swing, it contains a few examples. You can often override the look of components or just change the colors.

Some links:

  • Nimbus Colors
  • Skinning a Slider with Nimbus
  • Nimbus UIManager UIDefaults

And you can always change to another LaF, in example Substance.




回答2:


We've successfully used the NimROD Look and Feel to 'skin' the Swing look & feel. It works well, has several 'themes' already written for it, and can be added in a few lines of code.




回答3:


Swing has built-in dynamic look and feel support. If you are talking about desktop apps, you might want to start with Lesson: Modifying the Look and Feel.

Edit: If you are talking about a webapp, then absolutely use different .css to acheive a skinnable interface. CSS Zen Garden is a great example/tutorial on how the same page can look entirely different with a different .css file.



来源:https://stackoverflow.com/questions/2248342/skinning-java-desktop-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!