//
setEditable
public void setEditable(boolean b)
Sets the flag that determines whether or not this text component is editable.
If the flag is set to true, this text component becomes user editable. If the flag is set to false, the user cannot change the text of this text component. By default, non-editable text components have a background color of SystemColor.control. This default can be overridden by calling setBackground.
Parameters:
b - a flag indicating whether this text component is user editable.
Since:
JDK1.0
See Also:
isEditable()
///
setEnabled
public void setEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b. An enabled component can respond to user input and generate events. Components are enabled initially by default.
Note: Disabling a lightweight component does not prevent it from receiving MouseEvents.
Note: Disabling a heavyweight container prevents all components in this container from receiving any input events. But disabling a lightweight container affects only this container.
Parameters:
b - If true, this component is enabled; otherwise this component is disabled
Since:
JDK1.1
See Also:
isEnabled(), isLightweight()
以上是官方API解释,我英语不好,哈哈。你要是看懂了告诉俺一下,这里面好像是用户可以编辑,还有就是系统编辑,就是有些文本框,我们输入不进去,但是系统能输入进去。