![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hello, To be able to convert an applet into a Java application, you must add a main () method in the same class that is the applet. public static void main (String [] args) /* I don't know how to call paint without the graphics object, maybe you can try app1.paint (app1.getGraphics ()); or app1.repaint(); I would suggest repaint () in order to avoid calling getGraphics (), which may be null until the applet is fully loaded. frame.setVisible (true); This main method will allow you to wrap all your classes into a JAR file, and then distribute that. Pedro
Replies: |
Sponsored Links
|