aspose file tools*
The moose likes Java in General and the fly likes invoke method with java reflection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "invoke method with java reflection" Watch "invoke method with java reflection" New topic
Author

invoke method with java reflection

Geoffrey Laurens
Greenhorn

Joined: Sep 19, 2006
Posts: 24

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

Joined: Oct 30, 2001
Posts: 1970
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.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
wood burning stoves
 
subject: invoke method with java reflection