[問題] TreeNode的背景與文字顏色
請問一下該如何更改TreeNode的背景顏色
與文字顏色
下面是我的code
TreeNode root = makeTree();
model = new DefaultTreeModel(root);
tree = new JTree(model);
tree.setFont(new Font("Verdana", Font.PLAIN, 10));
tree.setForeground(new Color(0x00, 0x00, 0xff));
tree.setBackground(new Color(0xcc, 0xf4, 0xde));
tree view的背景色是改了
但是Tree node背景色依舊是白的
上網看了 可是沒找到該如何更改
TreeNode的背景色與文字顏色
謝謝大家的回覆
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.124.42.161
→
04/23 16:25, , 1F
04/23 16:25, 1F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):