JSplitPane divider color affected by contents
I'm working on an application that displays two JScrollPanes within a JSplitPane. Each of the JScrollPanes contains a JPanel that I'm drawing the content onto. The problem is that when I adjust the divider of the JScrollPane, the color of 开发者_如何学JAVAthe divider is affected. It seems to take on the appearance of the JPanel inside of it - that is, the background of the divider has snippets of the words and colors I'm displaying in the JPanel.
It seems like I'm missing a revalidate() or something here, but I can't get to the bottom of it.
Sounds to me you you might be forgetting:
super.paintComponent(g)
in the custom painting of the panel.
If you need more help then you need to post your SSCCE demonstrating the problem.
精彩评论