Is there a way to change the standard look of Swing components? Those default, look just pathetic and 开发者_开发知识库hopelesly unattractive.
Thanks.Yes, you can manually set a different look and feel.
Have a look at the following links
- Lesson: Modifying the Look and Feel
- 20+ Free Look and Feel Libraries for Java Swings
You can even write your own custom look and feel if you like.
- How to Write a Custom Look and Feel
For information, the default is the "Metal" look and feel, which was created by Sun as an alternative to the Windows 95/98 appearance, which explains the "unattractive", as of today's standards.
You can use the "system" look and feel, which will be a copy of what your system has (more or less):
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
There are other LaF available, like described in the other answers. The "Nimbus" is the new "Metal", developed by Sun as an alternative of today's standards. It is still young, though, and there are still things to fix and adjust.
Take a look at JGoodies - specifically their Looks libraries. It has tutorials and such about how to set its different look and feels
There's Nimbus for a more attractive default from Sun, provided in 1.6.10+. You can also find many different look and feels through Substance.
精彩评论