My aim is to rotate the text on a JTextarea. With the below code I could do the rotation. But now the problem is that I'am unable to set wordwrapping on the same as I have overriden the paintComponent method. It just puts everything in one line.
String sText = "I have changed your graphics. How can I set the wordwrapping on you ?";
Ouch. You're going to need to break the lines and do the wrapping yourself. You should be able to use a LineBreakMeasurer to determine where to break each line. Instead of drawing strings, you'll be working with TextLayout objects. It's a bit more work, but you'll have all the flexibility you need.