List of usage examples for javax.swing LookAndFeel isNativeLookAndFeel
public abstract boolean isNativeLookAndFeel();
From source file:Main.java
/** * With certain look and feels, namely windows with XP style, the focus of a toolbar button is already indicated (border changes) and the focus indicator should not be drawn: this fixes the visual rendering. * @param toolBarButton the tool bar button for which to adjust the focus state. *//* w w w . j ava 2 s.c om*/ public static void adjustToolbarButtonFocus(AbstractButton toolBarButton) { LookAndFeel lookAndFeel = UIManager.getLookAndFeel(); if (lookAndFeel.isNativeLookAndFeel() && System.getProperty("os.name").startsWith("Windows") && !Boolean.parseBoolean(System.getProperty("swing.noxp")) && !lookAndFeel.getClass().getName().endsWith("WindowsClassicLookAndFeel")) { toolBarButton.setFocusPainted(false); } }