• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

retrieving parameter names

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to retrieve the parameter names in the applet. Is there some way to do this?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's what getParameterInfo() is meant for. However, most (casual) programmers do not override this method, so you can't rely on it.

Basically, it's all about how the person who created the applet has documented it.


Offtopic: getAppletInfo() and getParameterInfo() should have been abstract methods, and (J)Applet abstract classes. How often do you use a default (J)Applet instead of a subclass anyway?
[ November 10, 2005: Message edited by: Rob Spoor ]
 
Johannes Postma
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that getParameterInfo() will do the job. I want to retrieve the parameters dynamicly. The applet doesn't know anything about the parameters not even the parameterNames. I want some method like getParameterNames().
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you can use LiveConnect (a big if), you can get at the DOM of the web page, and get the parameter names through the applet tag.

I think getParameterInfo was meant for the browser to call, so that it could show the creator of the web page what parameters to put into it. The HotJava browser used to do something along those lines. (There are similar methods for servlets, also universally ignored, only honored by Suns JavaWebServer.)
reply
    Bookmark Topic Watch Topic
  • New Topic