Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass array as Applet parametrs?

Status
Not open for further replies.

Vadim

Programmer
Feb 5, 2002
75
US
How to pass string array as Applet parametrs?
 
Just pass a series of parameters with numbers appended to the end. For example param0, param1, param2, param3, etc...

Then in the applet do something similar to:
Code:
ArrayList paramList = new ArrayList(20); // some initial size
int index = 0;
String param;
while ( (param = getParameter("param" + (index++))) != null) {
  paramList.add(param);
}
// Then if you really want an array 
// you can always call paramList.toArray()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top