java - How to change JavaFX TabPane pane type -


i want make webview inside anchorpane controlled tabpane: image

here's tabpane hierarchy in this:

enter image description here

i don't know how make webview fill entire area, , responsive @ same time. can change preferred size, don't know how make 100% fill pane. i'm brand new javafx, , using scene builder (i came swing). thank you!

a tab size content node fill available space in tab (up max size). long leave max width , max height of web view defaults (double.max_value), can place web view directly in tab without using anchor pane, , sized full size of tab.

here simple example:

<?xml version="1.0" encoding="utf-8"?>  <?import javafx.scene.web.*?> <?import java.lang.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.control.tabpane?>   <tabpane xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1">    <tabs>       <tab text="untitled tab">          <content>             <webview fx:id="webview" prefheight="200.0" prefwidth="200.0" />          </content>       </tab>    </tabs> </tabpane> 

here document hierarchy in scene builder:

enter image description here


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)