I want to make the background of a JGraphX graph component (https://github.com/jgraph/jgraphx) a specific color all over. I tried the standard call for any Swing component:
graphComponent.setBackground(Color.BLACK);
but this has no effect. I tried forcing a repaint of the component also, no luck. Is the call incorrect, or is there some specific way to force a refresh?
Since
mxGraphComponent
extendsJScrollPane
change the background of the view port:From JScrollPane docs: