aspose file tools*
The moose likes Java in General and the fly likes How to import a class in real time? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to import a class in real time?" Watch "How to import a class in real time?" New topic
Author

How to import a class in real time?

Guilherme Silveira
Greenhorn

Joined: Sep 21, 2001
Posts: 12
I have got a GUI application which has got GUI objects all extending a common guiClass (or so).
What I need is to make a designer which would read all classes under the gui package so it could allow the user to design an output with all those guiClass inside this package.
But how to get to know all those guiClasses inside this package? How to import them real-time also?
Thanks in advance,

------------------
------------------
TechnoBug


------------------<br />TechnoBug
Geoffrey Falk
Ranch Hand

Joined: Aug 17, 2001
Posts: 171
    
    1
Look up the Class Loader and the Reflection API.
Geoffrey

------------------
Sun Certified Programmer for the Java 2 Platform


Sun Certified Programmer for the Java 2 Platform
Guilherme Silveira
Greenhorn

Joined: Sep 21, 2001
Posts: 12
Thanks Geoffrey, but reading it still leaves with the question on how to read a whole package since i do not know the classes name.
I just now i want (i.e.) to read all the classes inside the "java.lang" package. So, if I know the classes names i just use the reflection api, in my case i still do not know the classes names. I have to call something to get to know all the classes under the package and then going to use the reflection api to get their methods/objects/etc...
Thanks in advance once again
Bug
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
technobug,
Please change your name to be compliant with JavaRanch's naming policy.
Your ID should be 2 separate names with more than 1 letter each. It should not be obviously fictitious. We really want this to be a professional forum and would prefer that you use your REAL name.
Thanks,
Cindy

"JavaRanch, where the deer and the Certified play" - David O'Meara
Guilherme Silveira
Greenhorn

Joined: Sep 21, 2001
Posts: 12
Well Cindy, I did not find where to change my name (I just found a page to change miscellaneous information about myself) therefore I will be creating a new profile...
Sorry for the misunderstanding
Guilherme (TechnoBug)
Guilherme Silveira
Greenhorn

Joined: Sep 25, 2001
Posts: 1
Done


-------------------------<BR>Guilherme Silveira
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to import a class in real time?
 
Similar Threads
GUI Design issue
Co-dependent Classes
java import packages question
Adding a GUI to an existing program
swing questions