Since mxGraphComponentextends JScrollPanewill change the background of the view port:
graphComponent.getViewport().setOpaque(true);
graphComponent.getViewport().setBackground(Color.BLACK);
From JScrollPane docs:
, , scrollPane.getViewport(). setBackground(). , scrollpane - , JViewport , , , , , , . , JScrollPane , , , .