• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

invoke method with java reflection

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

this is my class, i'm trying to setText in npm, nama by java reflection.
first i'm read all field thats available in this class, than if the field is type of JTextField than i'm try to invoke the setText method in that field with "geox" value. but it doesn't work why? can you all master java help me please.............

thanks for the reply
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is nearly a cross-post, as an almost identical post has been put in beginner forum. We don't like cross-posters.

Anyway. In what way "doesn't work"?

And another thing. This seems a very strange thing to be doing. Is it just a programming exercise? If not and it is for a real application, you should probably take a simpler, more direct approach.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since, as Peter points out, this is a cross post, and its not really an advanced question I'm closing this topic. Please continue any dicussions in your other topic.
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic