Java JTextField Value Get getFieldValue(JTextField tf)

Here you can find the source of getFieldValue(JTextField tf)

Description

get Field Value

License

Open Source License

Declaration

protected static String getFieldValue(JTextField tf) 

Method Source Code

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

import javax.swing.JTextField;

public class Main {
    protected static String getFieldValue(JTextField tf) {
        String ret = tf.getText().trim();
        if (!ret.equals("")) {
            return ret;
        }/*from  w  w w  .j ava2 s. com*/
        return null;
    }
}

Related

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