How do we change the background of JavaFX canvas? The only solution I have now is:
GraphicsContext gc = canvas.getGraphicsContext2D();
gc.setFill(Color.BLUE);
gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());
Is there another solution except drawing a rectangle? I searched in CSS but canvas doesn't have -fx-background-color