New to Java2D, quick question

Hi all,

I am J2EE developer and need a quick help from Java 2D experts..

I have an image (rectangle) and need to fill it with some text (drawing/super imposing rectangle with some text).

If text can not be fit into that rectangle, it needs to be shown with ellipses (...) at the end of last fitted character in the rectangle..

text is variable and can be of any length..

How can i check if text can/can not be fit into the rectangle? And if so how do i put ellipses after exact character?

Can any one guide?

Thanks.

[564 byte] By [nirav-patela] at [2007-11-26 18:54:07]
# 1
Look into [url= http://java.sun.com/j2se/1.5.0/docs/api/java/awt/FontMetrics.html]FontMetrics[/url].Good luck.
CaptainMorgan08a at 2007-7-9 6:28:08 > top of Java-index,Security,Cryptography...