wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: http://aspose.com/file-tools
subject: ///applet///
Similar Threads
JDCert Q - Applet
Answer :Run time error / why?
applet with a constructor