File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invoke method with java reflection

 
Geoffrey Laurens
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Peter Chase
Ranch Hand
Posts: 1970
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic