Menu

#214 TextControl

open
nobody
5
2012-12-13
2011-12-26
Anonymous
No

no method ! .setDocument
plese add!
textControl1.setDocument(doc);

JTextField
setDocument(Document doc)
Associates the editor with a text document.

setDocument
public void setDocument(Document doc)Associates the editor with a text document. The currently registered factory is used to build a view for the document, which gets displayed by the editor after revalidation. A PropertyChange event ("document") is propagated to each listener.

Overrides:
setDocument in class JTextComponent
Parameters:
doc - the document to display/edit
See Also:
JTextComponent.getDocument()

--------------------------------------------------------------------------------

http://docs.oracle.com/javase/1.4.2/docs/api/javax/swing/JTextField.html#setDocument\(javax.swing.text.Document)

Discussion


Log in to post a comment.