Top-left and -right corner rounded in Javafx/CSS

user2361460 picture user2361460 · May 15, 2013 · Viewed 35.8k times · Source

I would like to create a Pane with 2 rounded corners top-left and top-right, how can i do this in javafx? I know that u can use "border-top-left-radius" in normal css but it wont work under javafx. Until now I tried:

.calendar {
    -fx-border-top-left-radius: 10px; 
    -fx-border-top-right-radius: 10px; 
}

Thanks in advance,

Zombie

Answer

tonimaroni picture tonimaroni · May 15, 2013
.calendar{

  -fx-border-radius: 10 10 0 0;
  -fx-background-radius: 10 10 0 0;

  /* top-left, top-right, bottom-right, and bottom-left corners, in that order. */
}