Here is a little bit of code that I use to make all my Java programs display the host computer’s native user interface theme:
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e)
{
System.out.println("Error setting native look and feel:"+e);
}
For further reading on the topic, here is a link to Sun’s website describing the topic in detail.
Yes, it actually works pretty well. I found another cool java class that is more suited for native look and feel on Mac that I am getting ready to try out. I will post the findings here of course.
Good find, man! I was never fond of the non-native spin Java puts on a lot of GUI apps. This makes them a little more “home-y.”