Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to call a function of an applet.

Status
Not open for further replies.

igowi

Programmer
Sep 18, 2001
45
US
I have an applet class.
By using class AppletStub, I want to call a function of an applet. From a class extends AppletStub, we can call the applet's init() and start(). right?
I want to call the other functions in the applet.
How can I do?
help me.
I hope you understand what I am saying.
If you don't, please tell me so that I can explain in a different way.

thanks.

 
This type of thing can almost always be avoided be refactoring your code correctly. An Applet's method should never be called by other classes. If the Applet is currently performing functionality that could be used by other classes than it should be broken out into a separate class. Than the Applet could be using this new class along with everybody else that needs the functionality.

Now if you need Applet specific things (like init(), etc.) than you will obiviously need to call the Applet. I don't see any reason why another class you want to do this. If it needs that much of the Applet's inner functionality than it should be subclassing. Wushutwist
 
Thanks
1. "If it needs that much of the Applet's inner functionality then it should be subclassing."
What do you mean by that?

2. Class.forName("nice").getInstance()
I tried this.
but, it didn't make same instane as new nice().
what the function is doing exactly?

3. I want to know HTTPClassLoader.
I can download and load from outside's classes by using the HTTPClassLoader? If so, How?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top