java - In javafx how can I change between features with different fxml files? -


here program looks now. https://github.com/thelearningcurve/revampnutritionapi/issues/48

eventually have icons navigate between features. problem having not sure how change fxml files show different features without loading them @ once making them visible , not visible.

here frame.fxml code has our first feature in it. can see have frametopcontroller, , frameleftcontroller , framerightcontroller makes search feature. have few more features have no clue begin. of features placed in frame.fxml if possible.

` <?xml version="1.0" encoding="utf-8"?>  <?import javafx.scene.text.*?> <?import javafx.geometry.*?> <?import javafx.scene.*?> <?import javafx.scene.effect.*?> <?import javafx.scene.web.*?> <?import javafx.scene.image.*?> <?import javafx.scene.control.*?> <?import java.lang.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.layout.anchorpane?> <?import javafx.scene.control.textfield?> <?import nutritionapiv2_controllers.*?>  <fx:root maxheight="1.7976931348623157e308" maxwidth="1.7976931348623157e308" minheight="-infinity" minwidth="-infinity" prefheight="549.0" prefwidth="832.0" type="javafx.scene.layout.anchorpane" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">     <children>          <!-- top panel -->        <stackpane layouty="70.0" prefheight="479.0" prefwidth="832.0" anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="70.0">          <children>           <anchorpane minheight="0.0" minwidth="0.0" prefheight="473.0" prefwidth="832.0">                <children>                   <splitpane fx:id="navmenupane" dividerpositions="0.0036144578313253013" layouty="1.0" prefheight="442.0" prefwidth="832.0" anchorpane.bottomanchor="6.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="1.0">                     <items>                       <anchorpane fx:id="navmenu" maxheight="-infinity" maxwidth="-infinity" minheight="0.0" minwidth="0.0" prefheight="456.0" prefwidth="71.0" splitpane.resizablewithparent="false" />                       <anchorpane fx:id="leftandrightanchor" minheight="0.0" minwidth="0.0" prefheight="489.0" prefwidth="763.0">                            <children>                               <hbox fx:id="leftandrightpanel" alignment="center" layouty="-9.0" prefheight="479.0" prefwidth="824.0" spacing="1.0" anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="-9.0">                                  <children>                                             <!-- created brandon vandermeyf may 20 2015 -->                                                       <!-- left panel -->                                                      <framebottomleftcontroller fx:id="framebottomleftcontroller" />                                                      <!--  right panel -->                                                      <framebottomrightcontroller fx:id="framebottomrightcontroller" />                                     </children>                               </hbox>                            </children>                         </anchorpane>                     </items>                   </splitpane>                </children>             </anchorpane>          </children></stackpane>             <pane prefheight="64.0" prefwidth="833.0" style="-fx-background-color: #8bc34a;" anchorpane.leftanchor="0.0" anchorpane.rightanchor="-1.0" anchorpane.topanchor="0.0">                <children>                <frametopcontroller fx:id="frametopcontroller" layoutx="450.0" layouty="20.0" />                   <anchorpane layoutx="14.0" layouty="19.0">                      <children>                         <button id="menubutton" fx:id="menubutton" mnemonicparsing="false" opacity="0.37" prefheight="38.0" prefwidth="38.0">                            <effect>                               <imageinput>                                  <source>                                     <image url="/resources/menubutton.png" />                                  </source>                               </imageinput>                            </effect>                         </button>                         <label layoutx="45.0" layouty="-3.0"      prefheight="35.0" prefwidth="216.0" text="i'm program" textfill="white">                            <font>                               <font name="sansserif regular" size="24.0" />                            </font>                         </label>                      </children>                   </anchorpane>                </children>             </pane>      </children>     </fx:root>` 

what best practice when user clicks on icon header search field , center of frame change next feature (kind of mobile application)

thanks can provide.

here program...

https://github.com/thelearningcurve/revampnutritionapi


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -