Code example for JTextComponent

Methods: getDocument

0
				} 
			 
			}); 
		} else if (area instanceof JTextComponent) {
			JTextComponent c = (JTextComponent) area;
			c.getDocument().addDocumentListener(this);
		}  
	} 
	 
	/** 
	 * Overridden to set the enabled flag of the area. 
	 * @see JComponent#setEnabled(boolean) 
	 */ 
	public void setEnabled(boolean enabled)
	{ 
		area.setEnabled(enabled);
	} 
 
	/** 
	 * Implemented as specified by the {@link DocumentListener} I/F.