The Artima Developer Community
Sponsored Link

Java Answers Forum
how can i call one applet with another??

1 reply on 1 page. Most recent reply: May 28, 2003 1:50 AM by abdel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
abdel

Posts: 11
Nickname: caram
Registered: May, 2003

how can i call one applet with another?? Posted: May 27, 2003 1:18 AM
Reply to this message Reply
Advertisement
hi,

I've writing a tree applet(to get data system) and another applet(to get system property). I want that my class checkSystemPropertyApplet call the class treeApplet if it is possible otherwise a HTML message---------->because of your system property can not open your applet (for example).

Thanks


abdel

Posts: 11
Nickname: caram
Registered: May, 2003

Re: how can i call one applet with another?? Posted: May 28, 2003 1:50 AM
Reply to this message Reply
I've this code:

import java.awt.*;
import java.applet.*;
import java.net.*;
import java.awt.Label;

public class PropertyChecker extends Applet
{
URL url1;
URL url2;
String str1 = "file:///C://devlopment/applet.html";
String str2 = "file:///C://devlopment/test.html";

public void init()
{
add( new Button( "Button" ), BorderLayout.SOUTH );

add( new Label( "system name:" +
System.getProperty( "os.name" ) ) );
add( new Label( "architecture: " +
System.getProperty( "os.arch" ) ) );
add( new Label( "version: " + System.getProperty
( "os.version" ) ) );

}

public boolean action( Event evt, Object arg )
{
try
{
url1 = new URL(str1 );
getAppletContext().showDocument( url1 );
}
catch( MalformedURLException e )
{
System.out.println( "Error " + e );
}
return true;
}
}
I can call another applet but just wehn I click a button I want that this applet is being called automaticly otherwise a HTML page with an error

please help me!!

Flat View: This topic has 1 reply on 1 page
Topic: Char to boolean error Previous Topic   Next Topic Topic: JDBC in applets

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use