Hi.
I am using Spring for my Swing application.
And I came across a small problem.
I have a bean than extends JDialog class.
That works fine. But I need to instantiate this bean with a different constructor argument.Code:<bean id="infoDialog" class="InfoDialog" singleton="false" init-method="initUI"> <constructor-arg index="0"><ref bean="mainWindow"/></constructor-arg> </bean>
Basically I need to create a dialog and pass another dialog as constructor parameter and need to do so from my code, not from a config.
Something like this bean_factory.getBean("infoDialog", new Object[]{MyParentDialog})
How I can do it ?


Reply With Quote