JavaFX - show graph in pane on checkbox click -
i have fxml file has pane
1 of it's entries, used show graph. not not visible default. when checkbox checked, pane
visible. have add graph in pane
, show graph when pane visible. how achieve this? have created graph using link. javafx real-time linechart time axis
pane.visibleproperty().addlistener((obs, wasvisible, isvisible) -> { if(isvisible) { // pane became visible, add graph linechart<x, y> chart = ...; pane.getchildren().add(chart); } else { // pane became hidden, remove graph pane.getchildren().clear(); } });
Comments
Post a Comment