TreeCellRenderer: how to set background color?

前端 未结 1 1059
别跟我提以往
别跟我提以往 2020-12-20 21:13

I\'ve written a custom TreeCellRenderer in order to change a components appearance. Everything works fine, except that setBackground has no effect. The code is

相关标签:
1条回答
  • 2020-12-20 22:03

    Try adding a call to c.setOpaque(true).

    0 讨论(0)
提交回复
热议问题