Sabitha Somesula

Greenhorn
+ Follow
since Apr 08, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sabitha Somesula

My virtual keyboard have buttons to represent keys in keyboard. On button pressed action event is generated. To type some text in text field using virtual key board , changed all action events of each button pressed to key events and doing fireevent on textfield. But no text is seen in textfield. Not understanding what's happening with firevent. When printing keyevent code getting right code.

public void handle(ActionEvent event) {
textField.requestFocus();

KeyEvent keyEvent = KeyEvent.impl_keyEvent(textField, KeyCode.valueOf(name).impl_getChar(), name, KeyCode.valueOf(name).impl_getCode(), false, false, false, false, new EventType<KeyEvent>());

KeyCode code = keyEvent.getCode();
System.out.println("code : " + code);

textField.fireEvent(keyEvent);
keyEvent.consume();

}
10 years ago