Hi,
I have a jDialog that I use to search over several tables depending on parameters. So I can instantiate to search customer, departments, etc.
Now I want to add a new parameter to be able to add a button that opens the maintenance JDialog for the selected table, so if I instantiate the search jDialog to look for customers, when I press the button open the customers table jDialog,
if I'm looking for departments, open the departments table jDialog.
I think the best way should be pass the class to search dialog and from there instantiate the class, but my problem is I couldn't instantiate a class with two parameters the owner of window and the modal. Any knows how to do ?, I'm trying to avoid to have a hardcoded list of table dialogs nor pass and instantiated JDialog that most of the times wouldn't be used.
and easy view that I want is this
Class.forName(maintenancedialogname).newInstance(o wner,modal);
PD:sorry for my poor english