| Author |
Getting Font In JDialog Titlepane
|
Isaac Hewitt
Ranch Hand
Joined: Jul 24, 2006
Posts: 179
|
|
I need to access the Font in the TitlePane of my JDialog so as to measure the text in pixels as it increases after setText() method, in case it gets longer than the width of the Titlepane in which case I can resize the width of the JDialog programatically. There is not getFont() method for getTitle() method of JDialog.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4164
|
|
Windows only: Toolkit#getDesktopProperty("win.frame.captionFont")
From Windows Desktop Property Support.
edit Or use the LaF decorations. See Resize JDialog to fit dialog title
|
luck, db
There are no new questions, but there may be new answers.
|
 |
Isaac Hewitt
Ranch Hand
Joined: Jul 24, 2006
Posts: 179
|
|
Wow Darryl! Thank you so much for your help. I really appreciate it. This works alright.
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4164
|
|
You're welcome. This isn't a new question (are there any?), just a new twist on an old one.
Keeping a JDialog Title Centered.
|
 |
Isaac Hewitt
Ranch Hand
Joined: Jul 24, 2006
Posts: 179
|
|
Thanks for this too.
I am using 3 of the many Look And Feel classes available with a Synthetica license (which I highly recommend) and all 3 of these display the text in the centre of the JDialog title pane which I think is more elegant.
I will have a look at your link nevertheless, and I am sure I can learn something new from that.
http://www.jyloo.com
________________________________________
|
 |
 |
|
|
subject: Getting Font In JDialog Titlepane
|
|
|