Solved

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

Posted on 1997-11-12
2
206 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
ID: 1230469
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
ID: 1230470
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ForLoop Example 3 48
reverse digits of a number using for loop 5 40
expectj telnet failing 5 35
MySqlDump not dumping triggers 1 30
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

808 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