Mam stworzone GUI w programie Scene Builder, i mam kilka pytań, jak mogę otworzyć te gui jako aplikację (jestem nowy w tym) i jak zrobić że jak włączę na pełny ekran to tak na zasadzie jak działa na stronach boostrap to zmieni to wielkość elementów i dostosuje do wielkości ekranu. Jeśli tej wielkości się nie da to po prostu fullscrena zablokuje
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015, 2019, Gluon and/or its affiliates.
All rights reserved. Use is subject to license terms.
This file is available and licensed under the following license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution.
- Neither the name of Oracle Corporation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox prefHeight="400.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<MenuBar style="-fx-background-color: #242424;" VBox.vgrow="NEVER">
<menus>
<Menu id="menutxt" mnemonicParsing="false" text="Menu">
<items>
<MenuItem mnemonicParsing="false" text="Macro" />
<MenuItem mnemonicParsing="false" text="Kopanie" />
<MenuItem mnemonicParsing="false" text="Bindy" />
<MenuItem mnemonicParsing="false" text="Ustawienia" />
<MenuItem mnemonicParsing="false" text="Wyjdź" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="O Nas">
<items>
<MenuItem mnemonicParsing="false" text="Undo" />
<MenuItem mnemonicParsing="false" text="Copy" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Konto">
<items>
<MenuItem mnemonicParsing="false" text="About MyHelloApp" />
</items>
</Menu>
</menus>
</MenuBar>
<AnchorPane maxHeight="-1.0" maxWidth="-1.0" prefHeight="-1.0" prefWidth="-1.0" VBox.vgrow="ALWAYS">
<children>
<Label alignment="CENTER" layoutX="205.0" layoutY="14.0" style=" " text="TestowyProgram" textAlignment="CENTER" textFill="#34fa94" wrapText="false">
<font>
<Font name="System Bold" size="32.0" />
</font>
</Label>
<Button layoutX="203.0" layoutY="216.0" mnemonicParsing="false" prefHeight="19.0" prefWidth="109.0" style="-fx-background-color: #242424;" text="Zaloguj się!" textFill="WHITE">
<font>
<Font name="Arial Bold" size="12.0" />
</font>
</Button>
<Button layoutX="330.0" layoutY="216.0" mnemonicParsing="false" prefHeight="19.0" prefWidth="109.0" style="-fx-background-color: #242424;" text="Zakup Program" textFill="WHITE">
<font>
<Font name="Arial Bold" size="12.0" />
</font>
</Button>
<TextField layoutX="232.0" layoutY="128.0" prefHeight="25.0" prefWidth="176.0" />
<Label layoutX="233.0" layoutY="107.0" prefHeight="0.0" prefWidth="97.0" style=" " text="Login" textAlignment="CENTER">
<font>
<Font size="15.0" />
</font>
</Label>
<Label layoutX="232.0" layoutY="156.0" prefHeight="17.0" prefWidth="146.0" style=" " text="Klucz licencji" textAlignment="CENTER">
<font>
<Font size="15.0" />
</font>
</Label>
<Text fill="#9f9f9f" layoutY="374.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Copyright © 2021. All Rights Reserved To MatiGraphics.pl" />
<TextField layoutX="232.0" layoutY="177.0" prefHeight="25.0" prefWidth="176.0" />
</children>
</AnchorPane>
</children>
</VBox>