Possible Duplicate:
How to edit a text that is converted into image? or any other approach to realize/edit text
What I am trying to achieve is that... I have a text in textpane which I am converting to BufferedImage and resizing the size of the image by dragging it with mouse. Now If I want to edit the text, I am clicking on the image which hides the image and shows the text from textpane.
My problem is the size of the text in textpane is not resized(increased/decreased) as resize was done on image and not on text. So how do I change the font size as and when I resize the image containg text?