Java text to applet converter ... is there such a thing?

Posted by Jahkr on Stack Overflow See other posts from Stack Overflow or by Jahkr
Published on 2010-12-23T06:46:31Z Indexed on 2010/12/23 6:53 UTC
Read the original article Hit count: 262

Filed under:
|

Let's say you have this program:

public class sample

        public static void main(String args[])
        {
           System.out.println("Hello world!");
        }
}

... is there a converter that will turn it into this:

import java.applet.Applet; import javax.swing.*;

public class sample extends JApplet
{

    public static JTextArea area;

    public void init()
    {

        area = new JTextArea();
        add(area);
        area.append("Hello world!");
    }
}

I mean, I can do it by hand... but it would take some time.

© Stack Overflow or respective owner

Related posts about java

Related posts about conversion