UIDefaults defaults = UIManager.getLookAndFeelDefaults(); Font f = comboBox.getFont(); Color fore = comboBox.getForeground(); Color back = comboBox.getBackground(); if (f == null || f instanceof UIResource) comboBox.setFont(defaults.getFont("ComboBox.font"));  if (fore == null || fore instanceof UIResource) comboBox.setForeground(defaults.getColor("ComboBox.foreground"));  if (back == null || back instanceof UIResource) comboBox.setBackground(defaults.getColor("ComboBox.background"));
LookAndFeel.installColorsAndFont(comboBox, "ComboBox.background", "ComboBox.foreground", "ComboBox.font");
  protected void installDefaults()  {    UIDefaults defaults = UIManager.getLookAndFeelDefaults();    Font f = comboBox.getFont();    Color fore = comboBox.getForeground();    Color back = comboBox.getBackground();    if (f == null || f instanceof UIResource)      comboBox.setFont(defaults.getFont("ComboBox.font"));        if (fore == null || fore instanceof UIResource)      comboBox.setForeground(defaults.getColor("ComboBox.foreground"));    if (back == null || back instanceof UIResource)      comboBox.setBackground(defaults.getColor("ComboBox.background"));    // fetch the button color scheme    shadow = defaults.getColor("ComboBox.buttonShadow");    darkShadow = defaults.getColor("ComboBox.buttonDarkShadow");    highlight = defaults.getColor("ComboBox.buttonHighlight");  }