get Int From JavaFX Text Field - Java JavaFX

Java examples for JavaFX:TextField

Description

get Int From JavaFX Text Field

Demo Code


//package com.java2s;
import javafx.scene.control.TextField;

public class Main {
    public static int getIntFromTextField(TextField textField) {
        String text = textField.getText();
        return Integer.parseInt(text);
    }//w ww .  j  a va  2  s . com
}

Related Tutorials