aspose file tools*
The moose likes Applets and the fly likes getText() is not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "getText() is not working?" Watch "getText() is not working?" New topic
Author

getText() is not working?

munjal upadhyay
Ranch Hand

Joined: Sep 18, 2010
Posts: 69

the problem is written in the comments




Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Sep 18, 2010
Posts: 69

I got it ....

thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getText() is not working?