问题
Is their a way to determine the size of window caption using Java AWT. I just changed the caption size on my local windows 7 machine using (Start-> Control Panel -> Display ->Personalization -> Window color -> Advanced appearance settings. In the drop down select caption size and set it to 50.
Any inputs on determining the caption size using Java AWT would be greatly helpful.
Thanks
回答1:
Here you can find a list of properties of Windows GUI and how to retrieve them. I hope you can find the appropriate property in this list.
回答2:
The piece of code to do this is as follows:
Integer i = (Integer) Toolkit.getDefaultToolkit().getDesktopProperty
("win.frame.captionHeight");
System.out.println(i.intValue());
来源:https://stackoverflow.com/questions/12148683/determine-the-size-of-caption-windows-7-using-java-awt