Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Arrays in Applets

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to pass an array into an applet?
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean exactly? Where would the array come from?
 
Amanda Weber
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Example I have a regular HTML page that I want to keep as HTML - it is a form I want to pass many valued into an applet from the form. Instead of doing many getParams, can I just create it as an array, and pass it in to an appet?
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try passing a single parameter as a delimeted string, say a list of strings seperated by semicolons, then use java.util.StringTokenizer to extract the individual strings from your list.
 
Amanda Weber
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yah, that is what I am doing now, I was just wondering if there was an easier way
Thanx
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Rob,
c after long , huh? i thought either my eyes r getting worse not to c u or u r becoming too fat to be seen
anyways, hope u 've some memories reflecting my name...
i don't exactly remember right now but somebody asked the same question on JSP forum i guess. he wanted to pass an array of String to the applet which he was getting in the JSP that had the applet embeded in it. i suggested the same thing to him as i don't know any simple/direct way of passing an array.
also if we can use JavaScript and Applet communication using JSObject then we can have JavaScript array passed to an applet method. can't we?
regards
maulin
 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic