Here you can find the source of setEditableFalse(JTextField field)
public static void setEditableFalse(JTextField field)
//package com.java2s; //License from project: Open Source License import javax.swing.JTextField; public class Main { /** Set text field non-editable. Also sets it non-focusable. */ public static void setEditableFalse(JTextField field) { field.setEditable(false);/* w w w . j a v a2 s.c o m*/ field.setFocusable(false); } }