Changing the font size in java GUI
The problem basically is when I change the font size in Display Properties (specifically in Control Panel) the font in the GUI does not change.
The following steps give more explanation about the problem:
I changed the font size of the system.
2. After the font has been changed:
As you see in the picture:
the change happened to number 1 (The title of the GUI) but nothing happened to number 2 (File - Type Definition - ... etc).
My question is Is there any way to fix this problem in Java (adding some code , ... ) ?
Re: Changing the font size in java GUI
1) The titlebar Is actually a Windows component. Swing components are just displayed in a native OS frame. So I guess the native frame which is displaying the native titlebar is aware of the font size.
2) These are Swing components. The Font properties of each component are controlled by the UIManager. They are not aware of the OS font settings. You would need to manually loop through the UIManager to change the Font size of each individual component. I don't know how to query the OS to determine the font size setting.