Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clicking button to reverse text

 
gary davis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create a button, so when it is clicked the text
in the JText area will be reversed.
public void actionPerformed(ActionEvent e)
{
if (actionCommand.equals("Reverse"))
else
theText.setText("Error in memo interfact.");
}
 
jason candelora
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok...here is what I would do...

Let me know how this works for you!!
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my approach to it:

Regards,
Manfred.
[ November 23, 2003: Message edited by: Manfred Leonhardt ]
 
gary davis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manfred Leonhardt:
Here is my approach to it:

Regards,
Manfred.
[ November 23, 2003: Message edited by: Manfred Leonhardt ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic