View Single Post
  #8 (permalink)  
Old 12-10-2007, 04:01 PM
Rama Koti Reddy Rama Koti Reddy is offline
Member
 
Join Date: Dec 2007
Posts: 4
Rama Koti Reddy is on a distinguished road
KeyStroke group = KeyStroke.getKeyStroke(KeyEvent.VK_F4);
tfGroup.getInputMap().put(group, "Group");
Action groupAction = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
// add ur code here
}
};
tfGroup.getActionMap().put("Group", groupAction);
here tfGroup is TextField(Java Component) . when the Focus is on this tfGroup then press F4 .
Reply With Quote