Javafx-8 now has a method called GridPane#impl_getCellBounds that will make GridPane#impl_getCellBounds work, although it is part of the internal API. (Not sure if this was also available in javafx-2)
Please note that, as @olmstov commented, the mentioned method has been removed and removed in subsequent versions of javafx. If there is a better way (compatible with the public API), it is recommended to use it instead of this alternative.
n247s source share