鍵はここにVBox.setVgrow(tabPane, Priority.ALWAYS);
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MenuBar;
import javafx.scene.control.TabPane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
/**
*
* @author blj0011
*/
public class JavaFXApplication65 extends Application
{
@Override
public void start(Stage primaryStage)
{
VBox root = new VBox();
MenuBar mb = new MenuBar();
TabPane tabPane = new TabPane();
root.getChildren().addAll(mb, tabPane);
//StackPane stackPane = new StackPane();
CreateProfilePane cp = new CreateProfilePane();
tabPane.getTabs().add(cp);
VBox.setVgrow(tabPane, Priority.ALWAYS);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
launch(args);
}
}
です:
私はTabPaneのタブでこれを持っていますあなたが何をしているのか、それをどう行っているのかを見ることができます。 – Sedrick
@SedrickJeffersonコード –
を追加しました。特定の回答が必要な場合は、ビューの完全なコードを追加する必要があります。 – Sedrick