How to set default font for all the JComponents in a JFrame

Any body could help me about the title question?- Denis
[76 byte] By [denisyu] at [2007-9-26 1:55:50]
# 1

You can specify all of the fonts you wish to

use at the UIManager.

Another (uglier) way, is to write a recursive method which sets the fonts for all components in the contentpane of your frame. You could overwrite the add() method of the contentpane and call your recursive method everytime a component has been added.

p_b at 2007-6-29 3:10:18 > top of Java-index,Core,Core APIs...
# 2

> You can specify all of the fonts you wish to

> use at the UIManager.

>

> Another (uglier) way, is to write a recursive method

> which sets the fonts for all components in the

> contentpane of your frame. You could overwrite the

> add() method of the contentpane and call your

> recursive method everytime a component has been

> added.

>

Uglier? Thats what UIManager will do. But if you want to do whats already done, I suppose you could call it ugly.

dnoyeB at 2007-6-29 3:10:18 > top of Java-index,Core,Core APIs...