0
私は、フローパネルの使用をタブパインに切り替える予定です。私はどのようにするか分からない。 タブパイン内でキャンバスとペインを使用したいのですが可能ですか?以下 はJavaFXでTabPaneを使用
public View(TabPane root) {
this.root = root;
tab1 = new Tab();
root.getTabs().add(tab1);
tab2 = new Tab();
root.getTabs().add(tab2);
ui = new Pane();
canvas = new Canvas(600,600);
//gc is graphics context
gc = canvas.getGraphicsContext2D();
//this is where the problem is??
//i have no idea how to add ui and canvas to my tab1
tab1.getChildren().addAll(ui, canvas);
}