This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ///applet/// Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "///applet///" Watch "///applet///" New topic


chao-long liao
Ranch Hand

Joined: Jul 29, 2001
Posts: 78
import java.applet.Applet;
import java.awt.*;
public class Sample extends Applet {
private String text = "Hello World";
public void init() {
add(new Label(text));
public Sample (String string) {
text = string;
Viewing with another .htm,compile OK,but runtime error,I forget the reason.?
Applet can not has the constructor ?
Jamal Hasanov
Ranch Hand

Joined: Jan 08, 2002
Posts: 411
Try to add default constructor
public Sample () {
Jamal Hasanov
I agree. Here's the link:
subject: ///applet///
It's not a secret anymore!