Solved

how to write a main program and keep attaching helper programs as plugins

Posted on 1997-11-12
2
197 Views
Last Modified: 2013-11-18
I would like to write a presentation toolkit.
I want it to be a main program and several sub programs..
A version of the applet will consist of the main program
and one or more of these helper applications.
The main program will set a uniform format for the presentation usually a slide show and will take in the names of the helper (plugins) programs.
The helper applications will be text zoomers..image rotators..pixel based messaging and imaging.
Can anyone tell me how to go about writing a main program..
to which I can keep adding new effects (plugins) over time????


0
Comment
Question by:netsdt
2 Comments
 
LVL 4

Accepted Solution

by:
russgold earned 100 total points
Comment Utility
If you are writing an application (as opposed to an applet), you can use techniques such as those found in the example BeanBox to discover new classes added to a directory.  By loading those classes, you can test them to see if they conform to a predefined interface which will allow you to use them.

Applets are a bit more limited, in that they can only use classes from their predefined classpath; however, you can always get a class not linked into your applet if you know its full name:

Class newClass = Class. forName( "newPackage.newClass" );

You can then test the class for interfaces, etc.

Once you instantiate an object of this class using a default constructor:

Object myObject = newClass. newInstance();

you can use it in your program as though you actually had "linked" it in.
0
 

Author Comment

by:netsdt
Comment Utility
Hey Russgold,
Thanks for the prompt reply.
It is you guys who are running this site.Kudos!!!

Now, back to our problem, yes, i wish i could have made it an
application but I can't. I was thinking of using packages...
I could add new packages over time.Your idea sounds nice..
but i'm simply not that experienced..I wish I had an example
from somewhere..

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now