Detecting the native Look and Feel

Call the static method getSystemLookAndFeelClassName() of the UIManager class. It will return the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the default LookAndFeel class.

import javax.swing.*;
public class Main2
   public static void main(String[] args) {