java - JavaFX stylesheet not applied when fxml loaded node is added as a child -
i have fxml file references css file. when load fxml , set root of scene, css applied nicely.
however when create custom region (with getchildren made public), , add loaded fxml node it, no css applied anymore.
the css uses style classes.
what missing here?
/edit
i worked around using approach described here: http://www.guigarage.com/2012/11/custom-ui-controls-with-javafx-part-1
it doesn't answer initial problem guess it's better way of working anyway.
if can still explain behavior of original question, i'd happy hear it.
the problem used static load(...) method instead of instance load method created fxmlloader object.
Comments
Post a Comment