Javafx how to add content to an existing tab in fxml file dynamically -


i have seen lot of answers on how add new tab existing tab pane of fxml file. need add content existing tab of tab pane. possible? if yes how do that?

ofcourse possible. follow steps :

  1. assign fx:id tab in fxml
  2. use fx:id bind tab instance in controller.
  3. now, have instance, can add contents whenever want, using setcontent().

in fxml

... <tab fx:id="mytab"> ... 

in controller :

class mycontroller {     ...    @fxml    private tab mytab    ...     //somewhere in controller    tab.setcontent(somenode);    ... } 

Comments

Popular posts from this blog

javascript - Complete OpenIDConnect auth when requesting via Ajax -

apache - PHP Soap issue while content length is larger -

c# - Replace text in MailItem Body -