Benoem een AnchorPane van bvb 395 op 500 prefHeight="500.0" prefWidth="395.0" Benoem nadien een Pane van bvb 650 op 2000 Verdeel over dit Pane je verschillende objecten bvb.: -1: een foto, een knop, een label. -2: een foto, drie knoppen. -3. een browserobject (echt slechts als voorbeeld) |
Appoint a AnchorPane of for ex. 395 on 500 prefHeight="500.0" prefWidth="395.0" Appoint than a Pane of for ex. 650 on 2000
Order on this Pane the different objects you need: -1: A picture, a button, a label. -2: A photo, three buttons. -3. a browser object (really just an example) |
Designa un AnchorPane de por ejemplo 395 - 500 prefHeight="500.0" prefWidth="395.0" Entonces designa un Pane de, por ejemplo 650-2000
Ponga en su Pane los objetos diferentes, por ejemplo.: -1: Una imagen, un botón, una etiqueta. -2: Una foto, tres botones. -3. un objeto de navegador (en realidad sólo un ejemplo) |
1: movesamplelayout.fxml
<?xml version="1.0" encoding="UTF-8"?> <?import java.lang.*?> <?import java.net.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.effect.*?> <?import javafx.scene.image.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.paint.*?> <?import javafx.scene.shape.*?> <?import javafx.scene.text.*?> <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="527.0" prefWidth="352.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="move.MoveController"> <children> <Pane id="pane" fx:id="id_pane" layoutX="-6.0" layoutY="0.0" prefHeight="1468.0" prefWidth="717.0"> <children> <VBox id="VBox" alignment="CENTER" layoutX="38.0" layoutY="1229.0" spacing="5.0"> <children> <TextArea id="TextArea" fx:id="tekstgebied" prefWidth="200.0" rotate="337.0" text="Auteur Author : Piet België Belgium Move Sample" wrapText="true"> <stylesheets> <URL value="@splash.css" /> </stylesheets> </TextArea> <Button id="splashscreen" mnemonicParsing="false" onAction="#aksie_splashscreen" prefHeight="40.6839599609375" prefWidth="200.0" text="Splashscreen"> <font> <Font size="17.0" fx:id="x1" /> </font> <stylesheets> <URL value="@splash.css" /> </stylesheets> <textFill> <Color blue="0.000" green="0.800" red="0.063" fx:id="x2" /> </textFill> </Button> </children> </VBox> <VBox id="VBox" alignment="CENTER" layoutX="79.0" layoutY="60.0" spacing="5.0"> <children> <ImageView fitHeight="193.0" fitWidth="193.0" pickOnBounds="true" preserveRatio="true"> <image> <Image url="file:/C:/Users/Home/Pictures/penguin01.JPG" /> </image> </ImageView> <Button fx:id="welkom" mnemonicParsing="false" onAction="#aksie_welkom" prefHeight="115.0" prefWidth="193.0" text="Welkom" textFill="radial-gradient(focus-angle 0.0deg, focus-distance 0.0% , center 100.0px 100.0px, radius 200.0px, 0xff0000ff 0.0%, 0xff0000ff 10.0%, 0xffffffff 30.0%, 0x000000ff 100.0%)"> <font> <Font size="39.0" /> </font> <stylesheets> <URL value="@splash.css" /> </stylesheets> </Button> <Label text="Men's Desktop"> <effect> <Reflection fraction="0.9801587301587301" topOpacity="0.8412698412698413" /> </effect> <font> <Font name="Bookshelf Symbol 7" size="35.0" /> </font> </Label> </children> </VBox> <VBox id="hbox" alignment="CENTER" layoutX="487.0" layoutY="734.0" spacing="5.0"> <children> <ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true"> <image> <Image url="file:/C:/Users/Home/Pictures/penguin02.jpg" /> </image> </ImageView> <Button fx:id="info" font="$x1" mnemonicParsing="false" onAction="#aksie_info" prefHeight="41.0" prefWidth="200.0" text="Info" textFill="#ccff00"> <stylesheets> <URL value="@splash.css" /> </stylesheets> </Button> <Button fx:id="splashscreen" font="$x1" mnemonicParsing="false" onAction="#aksie_splashscreen" prefHeight="40.6839599609375" prefWidth="200.0" text="Splashscreen" textFill="$x2"> <stylesheets> <URL value="@splash.css" /> </stylesheets> </Button> <Button id="loadfxml" fx:id="laadfxml" font="$x1" mnemonicParsing="false" onAction="#aksie_laadfxml" prefHeight="41.0" prefWidth="200.0" text="Load new FXML" textFill="#00b4cc"> <stylesheets> <URL value="@splash.css" /> </stylesheets> </Button> </children> <stylesheets> <URL value="@splash.css" /> </stylesheets> </VBox> </children> </Pane> </children> </AnchorPane>
2: Start_move.java
3: MoveController.java
4:splash.css
|