package org.best.example;
/*
Get Applet Context Example
This java example shows how get applet context object using getAppletContext
method of Java Applet class.
*/
/*
<applet code="GetAppletContextExample" width=200 height=200>
</applet>
*/
import java.applet.Applet;
import java.applet.AppletContext;
public class GetAppletContextExample extends Applet{
public void init(){
/*
* To get Applet context object use
* AppletContext getAppletContext() method.
*/
AppletContext appContext = getAppletContext();
}
}
/*
Get Applet Context Example
This java example shows how get applet context object using getAppletContext
method of Java Applet class.
*/
/*
<applet code="GetAppletContextExample" width=200 height=200>
</applet>
*/
import java.applet.Applet;
import java.applet.AppletContext;
public class GetAppletContextExample extends Applet{
public void init(){
/*
* To get Applet context object use
* AppletContext getAppletContext() method.
*/
AppletContext appContext = getAppletContext();
}
}
No comments:
Post a Comment