How to change the color or background color of JSplitPane divider?
-
30-10-2019 - |
Question
I am trying to the set the background color for the JSplitPane divider. I've written the following code, but it doesn't seem to work.
BasicSplitPaneUI ui = (BasicSplitPaneUI) splitPane.getUI();
BasicSplitPaneDivider divider = ui.getDivider();
divider.setBackground(Color.decode("#FFFACD"));
I've even tried the suggestion given here How to set BackGround color to a divider in JSplitPane
Can someone please point out the mistake or let me know any other approach?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow