To answer to your questions,
1) Please check the difference between == and ===
2) Yes, that is possible to define the button that will appear depending on what is written in the text area. All you can do is, collect dynamic data entered by the user and then assign it to button text.
Hope this helps.
Ashwini Kashyap | www.infocepts.com
subject: Generate personal button with java (textual adventure building)