본문 바로가기
GUI( JavaFX Scene Builder )/SceneBuilder

버튼클릭을 통한 문자열 가져오기(1_FXML)

by pms93 2022. 8. 22.
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>

<HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="250.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1">
   <children>
      <VBox alignment="CENTER_RIGHT" prefHeight="200.0" prefWidth="300.0" spacing="10.0">
         <children>
            <TextField fx:id="idField" maxWidth="175.0" />
            <PasswordField fx:id="pwField" maxWidth="175.0" />
         </children>
      </VBox>
      <VBox alignment="CENTER_LEFT" prefHeight="200.0" prefWidth="300.0">
         <children>
            <Button fx:id="loginButton" mnemonicParsing="false" prefHeight="60.0" prefWidth="80.0" text="로그인">
               <VBox.margin>
                  <Insets left="10.0" />
               </VBox.margin>
            </Button>
         </children>
      </VBox>
   </children>
</HBox>