• Post Reply Bookmark Topic Watch Topic
  • New Topic

No idea for a problem  RSS feed

 
Gizzmo Zeuzere
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For my studies, I must find a way to know when a user enters a function in a jtextarea. For exemple, if i declare :
void find()
{
....
}
I want to have the declaration void find and the parameter of the function.
Does anybody have an idea ?
 
Rodney Woodruff
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need to call the function once the user enters it into the field then you need to use reflection.
You still need reflection even if you don't want to invoke the method the user enters. Either way, you have to use reflection.
But why would you allow a user to type in a function name rather than pull it from a menu or something?
[ May 18, 2002: Message edited by: Rodney Woodruff ]
 
Gizzmo Zeuzere
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, I must realize an application like Jbuilder or Jdevelopper. That's why I want to have the declaration of the function which are typed by the users in their java program. But I don't know how to do that.
 
Gizzmo Zeuzere
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anybody could help me please ?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gizzmo, I understand that english isn't your primary language, and please forgive us if we don't complete understand what you are asking for.
But I though the answer that Rodney gave you is the key to your solution. If you are building an IDE type program that is used to develop Java programs or to run Java Programs based on what the user types into a JTextField, then you must use the Reflextion API.
If we are misunderstanding you, we apologize.
Mark
Mark
 
Gizzmo Zeuzere
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry sorry (yes i know my english is very bad and i didn't understand (understood ?) the reflection)
What i would to say, it is :
how can i determine in real time when a user is typing a function?
Or can someone explain to me how to use the reflection?
(and sorry i'm french ;-) )
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK Gizzmo, let's do a trade. I think I might have a better understanding of what you might be asking.
Je Comprende. Pour an JTextField, vous voudrez savoir quand un usag�re types dans le JTextField.
Not when they type a classes function name, right?
So here is the trade. Ok for a name of a good hotel to stay in Paris, that's about 100 -125 Euro, that is nice, has shower, in great location, say deuxi�me Arrondissement au septi�me Arrondissement. I spelled that wrong, and the online English to French Dictionary couldn't help me.
I think you want to look at the TextListener, to find out when a user types into the JTextField.
I really need to practice my French before I go to Paris in July.
Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh and check out the JTextField Tutorial, I hope it shows up as French in your browser.
Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!