Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14051

Re: Applet code conversion...

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Applet code conversion...
Date 2012-04-30 06:06 -0400
Organization A noiseless patient Spider
Message-ID <jnlnsu$bbb$1@dont-email.me> (permalink)
References <4f9e356a$0$1390$4fafbaef@reader1.news.tin.it>

Show all headers | View raw


On 04/30/2012 02:50 AM, linus wrote:
> How an applet code code can be trasformed to an application code ?
> I thought that adding a "main" would be enough .... but it is not so
> easy ! Is there an example about this my problem ?
> Thank a lot.

For the simplest case:

import java.awt.BorderLayout;
import java.awt.Frame;
import javax.swing.SwingUtilities;
import usenet.linus.MyApplet;

public class AppletFrame {

   public static void main(String[] args) {
     SwingUtilities.invokeLater(new Runnable() {
           public void run() {
             MyApplet myApplet = new MyApplet();
             Frame myFrame = new Frame("Linus MyApplet Frame");
             myApplet.init();
             myFrame.add(myApplet, BorderLayout.CENTER);
             myFrame.pack();
             myFrame.setVisible(true);
           }
         });
   }
}

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Applet code conversion... linus <linus@yahoo.com> - 2012-04-30 08:50 +0200
  Re: Applet code conversion... Jeff Higgins <jeff@invalid.invalid> - 2012-04-30 06:06 -0400
  Re: Applet code conversion... Lew <noone@lewscanon.com> - 2012-04-30 03:07 -0700
    Re: Applet code conversion... linus <linus@yahoo.com> - 2012-05-01 09:28 +0200
      Re: Applet code conversion... Knute Johnson <nospam@knutejohnson.com> - 2012-05-01 08:44 -0700
        Re: Applet code conversion... linus <linus@yahoo.com> - 2012-05-02 15:45 +0200
          Re: Applet code conversion... Knute Johnson <nospam@knutejohnson.com> - 2012-05-02 16:58 -0700
      Re: Applet code conversion... Roedy Green <see_website@mindprod.com.invalid> - 2012-05-02 15:51 -0700
  Re: Applet code conversion... Tsukino Usagi <usagi@tsukino.ca> - 2012-04-30 20:40 +0900
  Re: Applet code conversion... Roedy Green <see_website@mindprod.com.invalid> - 2012-04-30 07:08 -0700

csiph-web