Package java.applet

Examples of java.applet.Applet$URLAudioClip


  public void start() {
    if(loaderFuture == null) {
      throw new IllegalArgumentException("Loader is not set!");
    }
    try {
      Applet applet = loaderFuture.get();
      applet.setVisible(true);
      //Set the applet/add it to the panel
      panel.setApplet(applet);
      panel.add(applet);
      //Needed to refresh :(
      frame.pack();
View Full Code Here


                if (focusLog.isLoggable(Level.FINER)) {
                    focusLog.log(Level.FINER, "default component is " + toFocus);
                }
            }
            if (toFocus == null) {
                Applet applet = EmbeddedFrame.getAppletIfAncestorOf(this);
                if (applet != null) {
                    toFocus = applet;
                }
            }
            return toFocus;
View Full Code Here

    public static void startApplet(String className,
                                   String title,
                                   String args[])
    {
       // local variables
       Applet a;
       Dimension appletSize;

       try
       {
          // create an instance of your applet class
          a = (Applet) Class.forName(className).newInstance();
       }
       catch (ClassNotFoundException e) { return; }
       catch (InstantiationException e) { return; }
       catch (IllegalAccessException e) { return; }

       // initialize the applet
       a.init();
       a.start();

       // create new application frame window
       AppletFrame f = new AppletFrame(title);

       // add applet to frame window
       f.add("Center", a);

       // resize frame window to fit applet
       // assumes that the applet sets its own size
       // otherwise, you should set a specific size here.
       appletSize =  a.getSize();
       f.pack();
       f.setSize(appletSize);

       // show the window
       f.show();
View Full Code Here

        if (port >= 0) {
            orbProp.put("org.omg.CORBA.ORBInitialPort", ""+port);
        }

        // Get Applet from environment
        Applet applet = null;
        if (env != null) {
            applet = (Applet) env.get("java.naming.applet");
        }

        // Create ORBs using applet and orbProp
View Full Code Here

     * @return the parent applet or {@ null}
     * @since 1.6
     */
    public static Applet getAppletIfAncestorOf(Component comp) {
        Container parent = comp.getParent();
        Applet applet = null;
        while (parent != null && !(parent instanceof EmbeddedFrame)) {
            if (parent instanceof Applet) {
                applet = (Applet)parent;
            }
            parent = parent.getParent();
View Full Code Here

    {
        String[] props = VersionHelper.PROPS;   // system/applet properties
        if (env == null) {
            env = new Hashtable(11);
        }
        Applet applet = (Applet)env.get(Context.APPLET);

        // Merge property values from env param, applet params, and system
        // properties.  The first value wins:  there's no concatenation of
        // colon-separated lists.
        // Read system properties by first trying System.getProperties(),
        // and then trying System.getProperty() if that fails.  The former
        // is more efficient due to fewer permission checks.
        //
        String[] jndiSysProps = helper.getJndiProperties();
        for (int i = 0; i < props.length; i++) {
            Object val = env.get(props[i]);
            if (val == null) {
                if (applet != null) {
                    val = applet.getParameter(props[i]);
                }
                if (val == null) {
                    // Read system property.
                    val = (jndiSysProps != null)
                        ? jndiSysProps[i]
View Full Code Here

*/
public class FileDialogReturnTest extends Applet
{

    public static void main(String[] args) {
        Applet a = new FileDialogReturnTest();
        a.init();
        a.start();
    }
View Full Code Here

*/
public class RegexpFilterTest extends Applet
{

    public static void main(String[] args) {
        Applet a = new RegexpFilterTest();
        a.init();
        a.start();
    }
View Full Code Here

        }
    }

    // Regression for HARMONY-3777
    public void test_instantiate_with_applet() throws Exception {
        Applet applet = (Applet) Beans.instantiate(null, "java.applet.Applet");
        assertNotNull(applet.getAppletContext());
        assertTrue(applet.isActive());
    }
View Full Code Here

                try {
                    result = c.newInstance();

                    if (result instanceof Applet) {
                        Applet applet = (Applet) result;

                        applet.init();
                    }
                } catch (IllegalAccessException iae) {
                    throw new ClassNotFoundException(iae.getClass() + ": " //$NON-NLS-1$
                            + iae.getMessage());
                }
View Full Code Here

TOP

Related Classes of java.applet.Applet$URLAudioClip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.