Applets
import java.applet.*;
import java.awt.*;
import java.util.*;
// This applet demonstrates the use of the getApplets method to
// get an enumeration of the current applets.
public class ListApplets extends Applet {
   public void init() {
      // Get an enumeration all the applets in the runtime environment
      Enumeration e = getAppletContext().getApplets();
      // Create a scrolling list for the applet names
      List appList = new List();     
      while (e.hasMoreElements()) {
          // Get the next applet
          Applet app = (Applet) e.nextElement();
          // Store the name of the applet s class in the scrolling list
          appList.addItem(app.getClass().getName());
      }
      add(appList);
   }
}
I hope that did it!
by 11037803
Here are some useful links on applet to applet communication. I don t know if they will solve your
problem but these are a variety of good approaches for this type of issue.
http://www.javaworld.com/javaworld/javatips/jw javatip101.html
http://www.twf.ro/calculatoare/TricksJavaProgramGurus/ch1.htm
http://www.galasoft lb.ch/myjava/CommTest/backup00/
http://www.rgagnon.com/javadetails/java 0181.html
http://www.2nu.com/Doug/FAQs/InterframeIAC.html
by Mickey Segal
 Q: I would like to ask if there  s anyway that I can use the same program run as an applet or
application?
Answer: You would have to provide at least a main() for the application part, and init(), start(), stop(),
destroy() for the applet part of your program. Your class could simply display the applet within a
Frame.
Example:
class Foo extends Frame {
   public Foo(String title){
      //...
      Foo applet = new Foo();
      applet.start();
      add(applet, "Center");
      //...
   }
file:///F|/a_jsite/350_tips/applets.htm (7 of 9) [2001 07 08 11:24:47]






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java web hosting

 

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved