File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Start: applet not initialized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Start: applet not initialized" Watch "Start: applet not initialized" New topic

Start: applet not initialized

Subodh Khandelwal

Joined: Mar 22, 2001
Posts: 4
Hi! Friends,
This problem i am facing when i view the applet in a browser or appletviewer. I just get a blank applet with an error message "Start: applet not initialzed" in the status bar.
I am just enclosing a simple code. Please advise and help me get rid of this error.
// use parameters
import java.awt.*;
import java.applet.*;
<applet code="ParamDemo" width=300 height=80>
<param name=fontName value=Courier>
<param name=fontSize value=14>
<param name=leading value=2>
param name=accountEnabled value=true>
public class ParamDemo extends Applet {
String fontName;
int fontSize;
float leading;
boolean active;

//Initialize the string to be displayed
public void start() {
String param;

fontName = getParameter("fontName");
if(fontName == null)
fontName = "Not Found";

param = getParameter("fontSize");
if(param != null) // if not found
fontSize = Integer.parseInt(param);
fontSize = 0;
} catch(NumberFormatException e) {
fontSize = -1;

param = getParameter("leading");
if (param != null) // if not found
leading = Float.valueOf(param).floatValue();
leading = 0;
} catch(NumberFormatException e){
leading = -1;

param = getParameter("accountEnabled");
if (param != null)
active = Boolean.valueOf(param).booleanValue();

// Display parameters
public void paint(Graphics g) {
g.drawString("Font name: " + fontName, 0, 10);
g.drawString("Font size: " + fontSize, 0, 26);
g.drawString("Leading: " + leading, 0, 42);
g.drawString("Account Active: " + active, 0, 58);
usman ahmad
Ranch Hand

Joined: Mar 06, 2001
Posts: 46
Hi! Subodh.
I checked the code but it is working .
You can check this at the following link.
and then see if anything is wrong.
I agree. Here's the link:
subject: Start: applet not initialized
It's not a secret anymore!