Error with code

P

pandit

I dont Know whts wrong with code ?
its compling but not working (Running ) why
i don't know
can anyone tell me

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

/* <applet code="Acdemo" width=300 height=50>
</applet> */

public class Acdemo extends Applet
{
String msg;
public void start()
{
AppletContext ac = getAppletContext();
URL url = getCodeBase();
msg=url.toString();
try{

ac.showDocument(new URL(url + "te.html"));

}catch(MalformedURLException e)
{
showStatus("file not found");



}
}


}

Thanks in advance
 
G

GArlington

I dont Know whts wrong with code ?
its compling but not working (Running ) why
i don't know
can anyone tell me

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

/* <applet code="Acdemo" width=300 height=50>
</applet> */

public class Acdemo extends Applet
{
String msg;
public void start()
{
AppletContext ac = getAppletContext();
URL url = getCodeBase();
msg=url.toString();
try{

ac.showDocument(new URL(url + "te.html"));

}catch(MalformedURLException e)
{
showStatus("file not found");

}

}

}

Thanks in advance

<APPLET CODE=AppletSubclass.class WIDTH=anInt HEIGHT=anInt>
</APPLET>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top