UIDefaults defaults = UIManager.getLookAndFeelDefaults();  slider.setForeground(defaults.getColor("Slider.foreground")); slider.setBackground(defaults.getColor("Slider.background")); shadowColor = defaults.getColor("Slider.shadow"); highlightColor = defaults.getColor("Slider.highlight"); focusColor = defaults.getColor("Slider.focus"); slider.setBorder(defaults.getBorder("Slider.border"));
LookAndFeel.installColors(slider, "Slider.background", "Slider.foreground"); LookAndFeel.installBorder(slider, "Slider.border"); shadowColor = UIManager.getColor("Slider.shadow"); highlightColor = UIManager.getColor("Slider.highlight"); focusColor = UIManager.getColor("Slider.focus"); focusInsets = UIManager.getInsets("Slider.focusInsets");
  protected void installDefaults(JSlider slider)  {    UIDefaults defaults = UIManager.getLookAndFeelDefaults();    slider.setForeground(defaults.getColor("Slider.foreground"));    slider.setBackground(defaults.getColor("Slider.background"));    shadowColor = defaults.getColor("Slider.shadow");    highlightColor = defaults.getColor("Slider.highlight");    focusColor = defaults.getColor("Slider.focus");    slider.setBorder(defaults.getBorder("Slider.border"));    slider.setOpaque(true);    focusInsets = defaults.getInsets("Slider.focusInsets");  }