home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 475 b | 28 lines |
- import java.awt.*;
-
- public class TestLoader extends java.applet.Applet
- {
- public void init()
- {
- setLayout(new BorderLayout());
- Class n;
- System.out.println("About to load Dummy class");
- try
- n = Class.forName("Dummy");
- catch(ClassNotFoundException e)
- return;
- System.out.println("Loaded dummy class");
-
- Component c;
- try
- c = (Component)n.newInstance();
- catch(InstantiationException e)
- return;
- catch(IllegalAccessException f)
- return;
-
- add("Center",c);
- }
- }
-
-