java - How to perform an action programmatic like action performed of JButton? -


i have actionsave class extends abstractaction.i use save button. somewhere else want run same instant of used button. came conclusion use below not know pass argument?

model.getactionsave().actionperformed("what should add here action event"); 

extract code of actionperformed() method method without argument, , call method instead:

public void actionperformed(actionevent e) {     save(); }  public void save() {     ... }  ...  model.getactionsave().save(); 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -