Here you can find the source of getFieldValue(JTextField tf)
protected static String getFieldValue(JTextField tf)
//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; } }