Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quetion about Changing labels on Buttons

 
Avin Sinanan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok here are the requirements
1)There is a button on a JPanel which says "Click Me".
2)When You Click it the button displays "Thank you for clicking".
3)When it has been clicked not only does teh label on the button change but a message jus below the button is displayed .. something like " You have just pressed the Button".
can anyone show me how to do this?
Thank you for giving this a read...
Thanks for reading


------------------
thank you
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a real fast quick-and-dirty. I don't know if it will compile but it should be close. There should also be enough here for you to play around with your requirements a little more.

If the compiler really bombs let me know what error you get.
Also, please see your other post with regard to JavaRanch's naming policy.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Sean MacLean
author
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"avinsinanan",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.
Sean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic