Share model object in java mvc -


i'm making application mvc architecture. question is: how can share istance of model between many classes in controller?

it difficult 'cause i'm using listener,i call listener controller passing model:

class buttonlistener1 implements actionlistener {      @override     public void actionperformed(actionevent e) {          system.out.println(e.getactioncommand());           if(e.getactioncommand().equals("inizia")){              //call controller passing model         }       }   } 

when construct button, can set model.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -