Is ther any way in which we can forcibly invoke button's action event As far as I remember there is some method doClick() but I am not able to figure it out in button class Can any one also pls let me knoe as how can I trap the enter key of keyboard Actually I want that on pressing enter key button.doClick method should be triggered Thnkx in advance
SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
I think you have a whole bunch of questions in here. Your first question:
Is ther any way in which we can forcibly invoke button's action event
Take a look at the API for AbstractButton - you would say myButton.doClick(); That makes your program act as if the user has physically clicked on the button. Have you registered your button with the action listener object? Once you do that, the doClick method should be triggered when the user clicks on the button.