Results 1 to 2 of 2
- 11-16-2011, 04:18 PM #1
Member
- Join Date
- Jan 2010
- Posts
- 80
- Rep Power
- 0
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:
1.
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 , ... ) ?
Thanks
- 11-16-2011, 04:59 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,158
- Rep Power
- 5
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.
Similar Threads
-
how can I change font size?
By rippon in forum AWT / SwingReplies: 6Last Post: 11-10-2011, 02:42 PM -
Changing the font of Message box
By venkateshcoolmoon in forum AWT / SwingReplies: 2Last Post: 03-16-2010, 05:18 AM -
Changing println font color
By xcallmejudasx in forum New To JavaReplies: 4Last Post: 05-21-2009, 04:05 PM -
changing font size
By diggitydoggz in forum New To JavaReplies: 1Last Post: 12-25-2008, 07:48 AM -
how to set font size for a xml value
By bala_kj in forum Advanced JavaReplies: 3Last Post: 04-01-2008, 11:00 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks