Here you can find the source of setUneditable(JTextComponent... components)
public static void setUneditable(JTextComponent... components)
//package com.java2s; //License from project: Open Source License import javax.swing.text.JTextComponent; public class Main { public static void setUneditable(JTextComponent... components) { for (JTextComponent component : components) { component.setEditable(false); }//from w w w. j a v a 2 s. com } public static void setEditable(JTextComponent... components) { for (JTextComponent component : components) { component.setEditable(true); } } }