UIDefaults defaults = UIManager.getLookAndFeelDefaults(); list.setForeground(defaults.getColor("List.foreground")); list.setBackground(defaults.getColor("List.background")); list.setSelectionForeground(defaults.getColor("List.selectionForeground")); list.setSelectionBackground(defaults.getColor("List.selectionBackground"));
LookAndFeel.installColorsAndFont(list, "List.background", "List.foreground", "List.font"); list.setSelectionForeground(UIManager.getColor("List.selectionForeground")); list.setSelectionBackground(UIManager.getColor("List.selectionBackground"));
  protected void installDefaults()  {    UIDefaults defaults = UIManager.getLookAndFeelDefaults();    list.setForeground(defaults.getColor("List.foreground"));    list.setBackground(defaults.getColor("List.background"));    list.setSelectionForeground(defaults.getColor("List.selectionForeground"));    list.setSelectionBackground(defaults.getColor("List.selectionBackground"));    list.setOpaque(true);  }