سؤال

For some reason, my TreeUI doesn't get applied. I am using MetalTheme and want to customize the TreeUI. So, I started by copying the TreeUI code and renaming the class EzTreeUI. Am I doing this right ? None of the commands below work. When I debug and step over the statements below, UIManager.getDefaults().get("TreeUI"); still returns javax.swing.plaf.metal.MetalTreeUI.

UIManager.getDefaults().put("TreeUI", EzTreeUI.class.getName());
UIManager.put("TreeUI", EzTreeUI.class.getName());
هل كانت مفيدة؟

المحلول

UIManager.put("TreeUI", "EzTreeUI");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top