Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about doClick( )

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey ranchers.
I have read the following about doClick( ) method :
Programmatically perform a "click". This does the same thing as if the user had pressed and released the button
does that mean that I can use doClick( ) instead of :
button.addActionListener(new ActionListener( )) approach ?
thanks.
 
Craig Wood
Ranch Hand
Pie
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The doClick methods in the AbstractButton api are a way to programmatically generate an ActionEvent from a JButton. The JButton still needs an ActionListener to receive the event that is generated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic