开发者

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

开发者 https://www.devze.com 2023-02-01 10:06 出处:网络
Let\'s say you have this program: public class sampl开发者_如何学Ce public static void main(String args[])

Let's say you have this program:

public class sampl开发者_如何学Ce

        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.


Nope.

Various IDEs that have RAD (rapid application development) features will autogenerate code behind your back in some circumstances, but that code is usually ugly and non maintainable.

So, for best results, continue typing...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号