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.
posted 11 years ago
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.