0 Replies Latest reply on May 23, 2013 6:28 AM by 1010553

    resizable webview pane in fxml

    1010553
      greetings,

      I'm new to java FX and I've been having problems with fxml. I created a custom WebViewPane class that extends from Pane class and the code is pretty much the same with the WebViewPane from the samples of WebViewBrowser. Then I tried to put that class into fxml files that will be used in a conroller class. and basically the fxml files is like this:

      <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="500.0" styleClass="background" xmlns:fx="http://javafx.com/fxml" fx:controller="lenterastudio.WebViewController" >
      <children>
      <WebViewPane fx:id="webPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="500.0" />
      </children>
      <stylesheets>
      <URL value="@Form.css"/>
      </stylesheets>
      </AnchorPane>

      the WebViewPane is showed up and successfully load a webpage but the problems are the pane itself is only filled some parts of the AnchorPane and when I tried to resize the form, the WebViewPane didn't align to it and still in the same size with the preferred Height and Width.
      can anyone give me advice how can I make the WebViewPane using the same Height and Width as the parent does? and how can I make it resizable using fxml?