aspose file tools*
The moose likes Beginning Java and the fly likes Clicking button to reverse text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Clicking button to reverse text" Watch "Clicking button to reverse text" New topic
Author

Clicking button to reverse text

gary davis
Greenhorn

Joined: Nov 15, 2003
Posts: 7
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

Joined: Sep 25, 2003
Posts: 16
ok...here is what I would do...

Let me know how this works for you!!
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Here is my approach to it:

Regards,
Manfred.
[ November 23, 2003: Message edited by: Manfred Leonhardt ]
gary davis
Greenhorn

Joined: Nov 15, 2003
Posts: 7
Originally posted by Manfred Leonhardt:
Here is my approach to it:

Regards,
Manfred.
[ November 23, 2003: Message edited by: Manfred Leonhardt ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Clicking button to reverse text