defaults.put("Tree[Enabled].collapsedIconPainter", collapsedIconPainter);
defaults.put("Tree[Enabled].expandedIconPainter", expandedIconPainter);
defaults.put("Tree:TreeCell[Focused+Selected].backgroundPainter", new SelectionBackgroundPainter(renderer.getBackgroundSelectionColor()));
TreeUI treeUI = getUI();
if (treeUI instanceof MetalTreeUI) {
BasicTreeUI basicUI = (BasicTreeUI) treeUI;
int size = 7;
BufferedImage expandedIcon = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
expandedIconPainter.paint(expandedIcon.createGraphics(), null, size, size);