Here you can find the source of checkJTextFieldNotEmpty(javax.swing.JTextField field, javax.swing.JLabel promptName, ArrayList
public static void checkJTextFieldNotEmpty(javax.swing.JTextField field, javax.swing.JLabel promptName, ArrayList<String> errors)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; public class Main { public static void checkJTextFieldNotEmpty(javax.swing.JTextField field, javax.swing.JLabel promptName, ArrayList<String> errors) { if (!isJTextFieldNotEmpty(field)) errors.add(promptName.getText()); }//w w w. jav a2s.co m public static boolean isJTextFieldNotEmpty(javax.swing.JTextField field) { return !(field.getText().trim().isEmpty()); } }