get Double From JavaFX Text Field - Java JavaFX

Java examples for JavaFX:TextField

Description

get Double From JavaFX Text Field

Demo Code


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

public class Main {
    public static double getDoubleFromTextField(TextField textField) {
        String text = textField.getText();
        return Double.parseDouble(text);
    }//  ww w .  j a v a  2 s . c  o m
}

Related Tutorials