title: Grey Scroll Pane Background Image in JavaFX
body: <p>I'm using JavaFX in Eclipse from JDK 1.8.0_72. I want to display an image in the background of a scroll pane. I'm using the following code to do this:</p>
  
  <pre><code>ScrollPane s2 = new ScrollPane();
  s2.setContent(label);
  s2.setStyle("-fx-background-image: url('DungeonRoomImage.png');");
  </code></pre>
  
  <p>This works just fine on other objects such as Labels and GridPanes but for some reason not on scroll panes where it's displaying a grey block in the middle covering up the image. If you look closely between the border and grey center you can see the image peeking out.</p>
  
  <p><a href="https://gyazo.com/597ce351f158c1d66c33fe301bd75feb" rel="nofollow">https://gyazo.com/597ce351f158c1d66c33fe301bd75feb</a></p>
  
  <p>The same issue occurs when changing the background color of a scroll pane, but is solved by using </p>
  
  <pre><code>-fx-background:
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>-fx-background-color:
  </code></pre>
  
  <p>I've tried using setBackground but that renders the same result</p>
  
  <pre><code>s2.setBackground(new Background(new BackgroundImage(new Image("DungeonRoomImage.png"), null, null, null, null)));
  </code></pre>
  
  <p>Could anyone suggest a way to get rid of the grey background or a way to work around the issue?
  Here's how the background image should look</p>
  
  <p><a href="https://gyazo.com/f84873278507700aea17452321b80b20" rel="nofollow">https://gyazo.com/f84873278507700aea17452321b80b20</a></p>