Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [albireo-dev] setComponentFont comes too late



Bruno Haible wrote:

The reason is that setComponentFont is called after the first label has
been created. IMO it comes too late. There's no reason to wait for the first
component to be created before setting the - system-wide - look&feel parameters.

Correct, and in fact, some of that code could be moved even earlier. We don't yet properly distinguish between the default "system" font and the current component font. I've been meaning to clean this up.


One could argue that the bug is in the sample: It should override the
updateAwtFont method to handle changes of the font. But this is a fit far-
fetched, since the method is not abstract and none of our existing samples
overrides it. The user is meant to implement this method if he wants good
reaction to system font changes, not also just for a good initial display.

Right, the client should not have to implement updateAwtFont by default. It is only there for special cases where additional work needs to be done that we can't know about.




Back to the top