Search code examples
javaswingnetbeanslook-and-feel

How can we merge elements from different look and feels?


I am a beginner in Java GUI, and I want to set a good looking look and feel; but the problem is that I don't like any of the look and feel completely. Everyone has some good and some bad styles. Being specific, I am using Nimbus look and feel, but I like the table and text area of liquid look and feel. I want to use Nimbus look and feel as default, but only use JTable and JTextArea of Liquid Look and feel. Is this possible?

Please answer using easy vocabulary, as I said I am a beginner.

ps: I use Netbeans.


Solution

  • You may be able to use the ad hoc approach shown here for JTree icons.

    image

    Left: com.apple.laf.AquaLookAndFeel

    Right: javax.swing.plaf.metal.MetalLookAndFeel

    Addendum: While not all combinations are compatible, you can examine the defined UIManager Defaults for keys common to both. A few JTable examples are shown here.