NightWalker
NightWalker

Reputation: 1

How can i set the proper font for java application on windows and mac?

I have been developing a program on a windows machine. All dimensions for the application are based on the default windows font and size. The default mac font seems to be larger in size, therefore not all text is visible in labels, comboboxes, ... How can i make sure that the proper font size is used on mac machines?

Upvotes: 0

Views: 668

Answers (2)

Damien
Damien

Reputation: 3220

Michael is right. Font sizes are not the only thing changing from one L&F to the other. Components like buttons can have different sizes too. So forget about hardcoded sizes. With Apple's control styles, developers now have a chance to choose the size of some components, but there is no guarantee this will work in the future if your layout is not flexible.

Upvotes: 0

Michael Borgwardt
Michael Borgwardt

Reputation: 346260

The correct way to do it is not to hardcode control sizes and use layout managers instead.

Upvotes: 3

Related Questions