Answer the question
In order to leave comments, you need to log in
Why is Java Applet not showing up in IE 11?
Java Applet not showing up in IE 11. Source code taken from "Java 7 Beginner's Guide 5th Edition":
import java.applet.*;
import java.awt.*;
/*
<applet code="Application.class" width=300 height=80>
<param name=author value="Herb Schildr">
<param name=purpose value="Demonstrate Parameters">
<param name=version value=2>
</applet>
*/
public class Application extends Applet {
String author;
String purpose;
int ver;
public void start() {
String temp;
author = getParameter("author");
if (author == null)
author = "not found";
purpose = getParameter("purpose");
if (purpose == null)
purpose = "not found";
temp = getParameter("version");
try {
if (temp != null)
ver = Integer.parseInt(temp);
else
ver = 0;
}
catch (NumberFormatException err) {
ver = -1;
}
}
public void paint (Graphics graph) {
graph.drawString("Purpose: " + purpose, 10, 20);
graph.drawString("By: " + author, 10, 40);
graph.drawString("Version: " + ver, 10, 60);
}
}
<applet code="Application.class" width=300 height=80>
<param name=author value="Herb Schildr">
<param name=purpose value="Demonstrate Parameters">
<param name=version value=2>
</applet>
Answer the question
In order to leave comments, you need to log in
Skip the chapter on applets. Browser support has been discontinued. The technology is not used anywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question