简体   繁体   中英

Add Layouts on TabPane JavaFX

i have a quick question. I want to build an UI with JavaFX. It should have tabs, each with some content. The problem that I have is, I dont know how to arrange the content in the tabs properly. Is there a possibility to add a Layout to the tabs? Like a Grid oder a Border Pane? And is it possible to have a different layout for each tab?

Thanks for the help!

Not sure if Tab allows that as while setting component we only have setContent(Node) mehtod but Tab is like a container (Control)you can add a container (any children of Node object) like Border Pane ,Flow Pane which support Laying out their children.

 Tab tab = new Tab();

BorderPane borderPane = new BorderPane();
//Add some in borderPane
tab.setContent(borderPane);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM