This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getText() is not working?

 
munjal upadhyay
Ranch Hand
Posts: 69
Java Mac OS X Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the problem is written in the comments




 
Paul Clapham
Sheriff
Pie
Posts: 20185
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that code is working correctly.

In your actionPerformed method you create a new Desine object. Naturally all of its instance variables are created and initialized as per lines 7 to 35 of your posted code. In particular the JTextFields are empty. So when you access the contents of one of those JTextFields you get an empty string.

I assume you are surprised that you don't get the data from the JTextField from the original Desine object, the one which would be referred to as "this" in the actionPerformed method. You shouldn't be surprised, because you didn't ask for the data from that object.
 
munjal upadhyay
Ranch Hand
Posts: 69
Java Mac OS X Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it ....

thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic