aspose file tools*
The moose likes Beginning Java and the fly likes ActionEvent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ActionEvent" Watch "ActionEvent" New topic
Author

ActionEvent

Al Finlay
Greenhorn

Joined: Oct 26, 2012
Posts: 16
I would like to understand the sequence involved here -

Netbeans auto-generated code stub for a button named convert


where is the code that generates the ActionEvent object passed to this method?

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4638
    
    5

Drop the visual designer. As you're discovering, it's not a beginners' tool.

Go through this tutorial: How to Write an Action Listener.

luck, db
There are no new questions, but there may be new answers.
Al Finlay
Greenhorn

Joined: Oct 26, 2012
Posts: 16
Sorry I'm not explaining myself very well. Take this small example:



The code in itself does not reveal the mechanics of what is actually happening here. It reminds me of jQuery functions .. but I can understand that because I can look at the underlying jQuery scripts.
Is the JVM automatically catching all events and passing them to any available methods? Is there no intermediary code?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Al Finlay wrote:Is the JVM automatically catching all events and passing them to any available methods? Is there no intermediary code?

The events are triggered in the JTextField, or some parent of the JTextField. The code is part of core Java, you will probably find it in the src.zip file (found inside your JDK folder). It might requires some digging though.

Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionEvent