Another way is to write two separate functions and assign them as action listeners to different buttons. This way not only you'll be able to show different text, but some other - different - actions.
Java is a cool thing, it works on tons of different devices and OSes... the second unique thing after C.
|