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


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

Re: Applet code conversion...

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Applet code conversion...
Date Mon, 30 Apr 2012 06:06:44 -0400
Organization A noiseless patient Spider
Lines 28
Message-ID <jnlnsu$bbb$1@dont-email.me> (permalink)
References <4f9e356a$0$1390$4fafbaef@reader1.news.tin.it>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 30 Apr 2012 10:01:02 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="lN5NBsxb/Hl+dKZczfqfVQ"; logging-data="11627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/gfraaA8XW2D5o2PoMPfO2v/gbFW/rK5o="
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120320 Icedove/3.0.11
In-Reply-To <4f9e356a$0$1390$4fafbaef@reader1.news.tin.it>
Cancel-Lock sha1:S2n3y+EdGgn6QWz62FajTKZ3MhM=
Xref csiph.com comp.lang.java.programmer:14051

Show key headers only | 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