Here you can find the source of isJComboBoxNotEmpty(javax.swing.JComboBox
public static boolean isJComboBoxNotEmpty(javax.swing.JComboBox<String> combo)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean isJComboBoxNotEmpty(javax.swing.JComboBox<String> combo) { return !((String) combo.getSelectedItem()).trim().isEmpty(); }//from w w w . j a va 2 s. com }