NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
ikvaso
Joined: 05 Nov 2011 Posts: 14
|
Posted: Thu Jan 19, 2012 7:52 pm Post subject: listeners not registered after topcomponent restored |
|
|
My TopComponent contains JTextArea with registred listeners (KeyListener and DocumentListener)
when this topcomponent is restored during application start (when TopComponent is opened before application is closed, it is restored on application start), these listeners are not registered
when I close and re-open TopComponent, listeners are being registered and working properly
has anyone got any experience with this? I've got the same code as stated in this Geertjan's blog (so I suppose it should work, but it does not):
| Code: | myTextField.getDocument().addDocumentListener(new DocumentListener() {
public void insertUpdate(DocumentEvent arg0) {
dummyNode.fire(true);
}
public void removeUpdate(DocumentEvent arg0) {
dummyNode.fire(true);
}
public void changedUpdate(DocumentEvent arg0) {
dummyNode.fire(true);
}
}); |
thanks |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|