Java basics
KeyListener
The class which processes the KeyEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addKeyListener() method.
Syntax:public interface KeyListener
extends EventListener
Example: public void keyPressed(KeyEvent e) {
if(e.getKeyCode() == KeyEvent.VK_ENTER){
statusLabel.setText("Entered text: " + textField.getText());
}
}
public void keyReleased(KeyEvent e) {
}
}
}
Content
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 528 / 159172419. Delta: 0.00261 с