File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Start Applet not initialized" Watch "Start Applet not initialized" New topic
Author

Start Applet not initialized

saurabh code sharma
Greenhorn

Joined: Jul 10, 2013
Posts: 1
I have created an applet and it is not working. When i try to run it in appletviewer it says Start Applet not initialized. Following is my code:

/*
<HTML>
<HEAD>
</HEAD>
<BODY>
<div >
<APPLET CODE="FormAction.class" WIDTH="800" HEIGHT="500">
</APPLET>
</div>
</BODY>
</HTML>
*/


import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class FormAction extends Applet implements ActionListener{
TextField text1;
TextField text2;
TextField text3;
Button button1;

public void init(){
setLayout(new FlowLayout());
button1 = new Button("Submit");
text1 = new TextField();
text2 = new TextField();
text2 = new TextField();

add(text1);
add(text2);
add(text3);
add(button1);

button1.addActionListener(this);
}

public void actionPerformed(ActionEvent evt){
if(evt.getSource() == button1){
text3.setText(text1.getText() + " " + text2.getText());
}
}
}

Can anyone please help me pointing out where am I wrong.
Thank You
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10270
    
    8

Welcome to the Ranch.
Can you copy paste what you see on your java console after running the applet?

Also please check your private messages for an important administrative matter


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
text3 is null.


Ping & DNS - my free Android networking tools app
 
wood burning stoves
 
subject: Start Applet not initialized