dcsimg
How to pass parameters to an applet in Java application?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Terence_Tse
Posted On:   Monday, December 3, 2001 02:38 AM

In HTML, we can use

tag to assign parameters to an applet.

In Java application, I can create a frame and then load up the applet. However, how to pass parameters to it?

Re: How to pass parameters to an applet in Java application?

Posted By:   Philip_Scuderi  
Posted On:   Monday, January 7, 2002 11:38 PM

Do you want to pass paramaters to an application. If that's what you're asking you do so in the main method.


public static void main(String[] args)

{

for (int i = 0; i < args.length())

System.out.println(args(i++));

}


Then when you launch your application do something like "java arg1 arg2" and so on.
About | Sitemap | Contact