Here you can find the source of isActiveComponents(JTextField... textFields)
public static boolean isActiveComponents(JTextField... textFields)
//package com.java2s; //License from project: Open Source License import javax.swing.JTextField; public class Main { public static boolean isActiveComponents(JTextField... textFields) { for (JTextField textField : textFields) if (textField.isEnabled()) return textField.isEnabled(); return false; }/*from w w w . j av a 2 s .co m*/ }