title: How to set Canvas3D background color?
body: <p>I have an application with a Canvas3D class for drawing three-dimensional objects. The canvas background is black by default. I want to change it but I don't know how. I have found a piece of code from internet but it doesn't work. Here is the code:</p>
  
  <pre><code>        setLayout(new BorderLayout());
      GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
      canvas = new Canvas3D(config);
  
  
      JPanel centerPanel = new JPanel(new GridLayout(1, 1));
      centerPanel.setBorder(BorderFactory.createLineBorder(Color.black));
      centerPanel.add(canvas);
  
      universe = new SimpleUniverse(canvas);
  
      Background newBk = new Background(new Color3f(Color.WHITE)); 
      newBk.setApplicationBounds(new BoundingSphere(new Point3d(0f,0f,0f), 100)); 
      canvas.getGraphicsContext3D().setBackground(newBk);
  </code></pre>
  
  <p>Would you plese helpm with this problem?</p>
  
  <p>Thanks in advance.</p>