Solved

Applet to Application converter.

Posted on 1997-04-29
1
245 Views
Last Modified: 2008-03-17
Dear sir,

  Can anyone tell me that there is any converter which can convert applet code to a standalone application?


thanks!

Benson
0
Comment
Question by:benson031397
1 Comment
 
LVL 1

Accepted Solution

by:
roy020697 earned 0 total points
ID: 1219963
All you need to do is

1. Add a main method to your applet:
public static void main( String argv[])
{
}

2. Create a window (or frame) in your main method in which to put
your applet code:
public static void main( String argv[])
{
  Frame f = new Frame( "My applet/application" );
}

3. Create an instance of the class for your applet
4. Add it to the frame
5. Call the init and start methods of your applet:
public static void main( String argv[])
{
  Frame f = new Frame( "My applet/application");
  MyAppplet a = new MyApplet();
   f.add( a );
   f.setVisible( true );
  a.init();
  a.start();
}

I don't know of any products which can do this for you (yet). Give it a try yourself!

-Roy

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
bigHeights  challenge 13 55
array11 challenge 16 51
HashMap Vs TreeMap 12 48
JDeveloper 12c for 32 bit 4 34
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now