i'm looking for what is the right way to set content in a Tab and how to set the WebView with a demonsion i tried this code:
if (cancell.isVisible()){
tabs.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> ov, Number oldValue, Number newValue) {
hyst.setVisible(false);
cancell.setVisible(false);
final WebView wb = new WebView();
wb.setLayoutX(-1);
wb.setLayoutY(128);
wb.setPrefHeight(700);
wb.setPrefWidth(1604);
WebEngine pp = wb.getEngine();
t.setContent(wb);
pp.load("http://www.google.com");
}
});
}
please can any body help me and thank youu !!