• Post Reply Bookmark Topic Watch Topic
  • New Topic

consume an action event  RSS feed

 
Vishal Mungi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to consume an actionevent ?

I have a window in which i have set a default button (WHEN_IN_FOCUSED_WINDOW)
,in another widget i dont want the default enter code to be called. I am only
handling the actionEvent in this widget.
 
Mark Van Tuyl
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the API docs, "Only low-level, system events can be consumed."

Here's a link: http://java.sun.com/j2se/1.4.2/docs/api/java/awt/AWTEvent.html
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does e.consume() not work?
 
Mark Van Tuyl
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.awt.ActionEvent inherits the consume() method from java.awt.Event, where the method has protected access.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!