Java JTextField Value Get getDoubleTextField(javax.swing.JTextField textField)

Here you can find the source of getDoubleTextField(javax.swing.JTextField textField)

Description

Return the text field value as a double.

License

Open Source License

Declaration

public static double getDoubleTextField(javax.swing.JTextField textField) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** //from   w  w  w .  j  a  v a 2 s .c  om
     * Return the text field value as a double.
     */
    public static double getDoubleTextField(javax.swing.JTextField textField) {
        return Double.parseDouble(textField.getText().trim());
    }
}

Related

  1. getDouble(javax.swing.JTextField input)
  2. getDoubleFromTextField(JTextField textField, double defaultValue)
  3. getFieldValue(JTextField tf)
  4. getInt(javax.swing.JTextField input)
  5. getInt(JTextField tf)
  6. getInteger(JTextField txt, Integer defaultVal)