How can i change the grid lines color / can i change the grid lines color? Cant seem to find a css solution.
Asked
Active
Viewed 6,495 times
2
-
1https://stackoverflow.com/questions/37619867/how-to-make-gridpanes-lines-visible – SedJ601 Sep 12 '17 at 07:53
-
Use the posted link but try changing the color from black to the color you are looking for. – SedJ601 Sep 12 '17 at 07:54
2 Answers
1
You can use this css it work for me :
.mygridStyle Line {
-fx-stroke : red;
}
then you attach the css class with the scene builder or with myGrid.getStyleClass().add("mygridStyle");

lrobert
- 11
- 2
1
As stated in this question here you shouldn't use GridPane to paint grid lines, you need to put content inside the cells, and then specify content borders. The visible grid line property if for debugging only, see doc.

xordonkey
- 89
- 4