This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Good usability dictates, the the Title should be short and concise. Like "Error" or "Open" or "Confirm". If you want to display more detailed information, you can make it a part of the message being displayed in the dialog.
Sorry for the late response. I managed to get this done.
I get the font used to paint the FRAME TITLE from the Look And Feel used. With the font create the Font Metrics. From the Font Metrics, get the width.
Below is the piece of code that I have used.