Question: How do I set my Java/Swing application to use the native look and feel of the platform it is running on?
Answer: Use the Java UIManager class to set the look and feel properly, like this:
Note that the
setLookAndFeel method can throw an
UnsupportedLookAndFeelException exception that you should handle.