File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doClick and trapping of enter key

 
Gaurav Chikara
Ranch Hand
Posts: 412
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dorothy Finkel-Laverty
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Garandi Garandi
Ranch Hand
Posts: 192
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might help you

Thank you
Garandi
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic