Is correct? Application (JFrame) to Applet (JApplet)
I need to convert a java application (JFrame) into an applet (JApplet), and I have seen a few "big steps":
1? make the class extends to JApplet instead of a JFrame
2? To replace the construction method by init ()
3? To comment the main method
Is correct?, because I have some doubts that later I磍l explain
Thanks
[349 byte] By [
jmgmyla] at [2007-10-2 22:23:06]

Thanks camickr. My original code is too long, I will try to put my errors of compilation before to put the code (because he is very long)
When I have this changes, I compile and it gives me an error (among others):
( in the init() method )
MainClassFile.java:165: call to super must be first statement in constructor
super("Title of my Application");
^
It is because in the JFrame, I have in my constructor method a call to super method.
Why this?, Can磘 I to call to super in que init method of a JApplet?
Thanks
I have said it, because in my application I have other files where I have calls to super method like (for example):
super(MainClassFile.mainWindow, " Attention!", true);
the error it generates is:
File.java:1638: cannot resolve symbol
symbol : constructor JDialog (MainClassFile,java.lang.String,boolean)
location: class javax.swing.JDialog
super(MainClassFile.mainWindow, " Attention!", true);
^
and if I comment this line, It does not compile.:(
I think in the init method (in a JApplet) I cannot call the super method. but my problem is how to change this? if in others files (in Files.java) I have calls to super metod, because thus it constructs a dialog box, asking for a file.
In file Files.java I have a class called "Abort" (extends to JDialog) in whitch:
/* class Files.java */
class Abort extends JDialog
{
boolean abort = true;
JTextArea mensage = null;
JButton acept = new JButton("Acept");
JButton cancel = new JButton("Cancel");
Abort(String nanemFile)
{
super(MainClassFile.mainWindow, " Attention!", true);
....
}
....
/* clas Files.java */
Please help