Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Keeping a JDialog Title Centered.

843806Jul 25 2008 — edited Jul 27 2008
Guys:

I have a strange problem and am not sure how to get around it. I am ising setTitle() to place a title string on my JDialog. Now I toulf like to center the title. On my desk PC I do this by simply inserting enough spaces before the title to center it. When I run there the title is beautifully centered. However, when I take my code to another computer (especially one made by another manufacturer) it is totally not centered. Is there a way to insure my title stays centered no matter what machine my code is running on? SetTitle(String) takes only a String argument.

Thank you in advance.

Phil Rossomando
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2008
Added on Jul 25 2008
10 comments
559 views