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
Post a Comment