Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

dynamically loading class object

  Asked By: Ira    Date: Jun 21    Category: Java    Views: 746
  

i have created the instance of class using

object obj=((Class)(class.forname("Nameof class")).newinstance();

i have more than 300 JFrame windows in my application , so i
dont want to use my frame names to create the instance.
in my case ..
1. how can i create instance of a frame that has one or more
than one argument ,( using above object creation we can create the
object of a class without arguments)
2. how can i invoke the methods in my frames (without casting
(using) frame names , declared methods and frame properties like
frame.front()..
3. how can i get the instance of windows who are opened and not
closed.( since i didn't declare those variable as a global)

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on dynamically loading class object Or get search suggestion and latest updates.




Tagged: