Here you can find the source of isEditable(Component comp)
public static boolean isEditable(Component comp)
//package com.java2s; //it under the terms of the GNU Affero General Public License as published by import java.awt.Component; import javax.swing.JComboBox; import javax.swing.text.JTextComponent; public class Main { /**//from w ww . j a va2s .c o m * return false if Component is not editable, otherwise true */ public static boolean isEditable(Component comp) { if (comp instanceof JTextComponent) { return ((JTextComponent) comp).isEditable(); } else if (comp instanceof JComboBox) { return ((JComboBox) comp).isEditable(); } else return true; } }