title: Creating image border with image JavaFX
body: <p>I have to do a TV screen using Scenebulider in JavaFX. I got to the point where I two images overlaps together and we can both of them but border image should be rounded and normal border should be visible too. The first photo is what I already have, and the second one is how it should look. It's stackpane in a stackpane. </p>
  
  <p>What I have:<br>
  <a href="https://i.stack.imgur.com/zBohX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zBohX.jpg" alt="What I have"></a> </p>
  
  <p>how it should look:<br>
  <a href="https://i.stack.imgur.com/PTFF0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PTFF0.jpg" alt="how it should look"></a></p>
  
  <pre class="lang-css prettyprint-override"><code>.backgorund{/*main stackpane*/
  
      -fx-background-image: url("drewno.jpg");
  
  }
  
  
  
  .test{/*stackpane within stackpane*/
  
      -fx-background-image:url(szum.jpg);
      -fx-border-image-source: url(drewno.jpg);
      -fx-border-image-width: 50, 100;
      -fx-border-image-slice: 50, 20;
      -fx-border-width:60,110;
      -fx-border-color: black;
  
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/f61Ah.jpg" rel="nofollow noreferrer">drewno2</a></p>
  
  <p><a href="https://i.stack.imgur.com/m7qPp.jpg" rel="nofollow noreferrer">szum</a></p>