aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes getText() question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getText() question" Watch "getText() question" New topic
Author

getText() question

Mike Brown
Greenhorn

Joined: Oct 19, 2003
Posts: 25
I hope I am not exceeding my limit of questions here. I appreciate the help so much. This will be my last question tonight I promise.Can somebody tell me where I went wrong on this. I just want to take the input from the textbox and display it with the paint method when the user clicks the button.

I edited your code to include the UBB Code Tags to make your code easier to read.
[ October 26, 2003: Message edited by: Gregg Bolinger ]
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
You set the text field value to a string at compile time. It's value at that time was an empty string. Move getting the value to your action performed method.
There are no limits to questions.
Mike Brown
Greenhorn

Joined: Oct 19, 2003
Posts: 25
Thanks Paul, I remember now that strings are immutable so the way I had it couldnt possibly work.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I hope I am not exceeding my limit of questions here.
That can never happen.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getText() question