This one is simple: you can either get instances from injector or annotate fields with @Inject and get the whole MainFrame from injector in main method.
On Monday, February 4, 2013 12:10:38 AM UTC+2, Satish Pokhrel wrote: > > Hello Everyone, > > I am new to Google *guice* and seeking for some ideas/help. Actually, i > want to implement DI in swing, I have an class MainFrame which extends > JFrame, it acts as a local controller for my gui and all the other classes > of my gui which extends JPanel are instantiated inside the MainFrame > constructor, actually all that classes are highly coupled with MainFrame > class. But, I can't figure out how to use guice in this case to make > classes loosely coupled. And for easiness i have attached link to that code > http://pastie.org/6035182 > > Regards, > > Satish > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
