Sun Jan 11, 2009 1:07 am
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class Applet1 extends JApplet {
boolean isStandalone = false;
TextArea textArea1 = new TextArea();
GridLayout gridLayout1 = new GridLayout(1,2);
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
public void init() {
try {
textArea1.setText("");
this.setSize(new Dimension(400, 296));
this.getContentPane().setLayout(gridLayout1);
this.getContentPane().add(textArea1, null);
}
catch(Exception e) {
e.printStackTrace();
}
}
//Get Applet information
public String getAppletInfo() {
return "Applet Information";
}
//Get parameter info
public String[][] getParameterInfo() {
return null;
}
}
<table>
<tr>
<td>
<jsp:plugin type="applet" code="Applet1.class"
codebase="/purejsp/TestApplet"
width="400"
height="300">
</jsp:plugin>
</td>
</tr>
</table>
Sun Jan 20, 2013 9:04 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.