Closed sgjava closed 3 years ago
hi @sgjava
you are very active on writing issues and feature requests. thank you very much π Currently UiBooster doesn't provide any methods for changing the font or font size. But you can use the Java Swing UIManager to change the settings globally.
final FontUIResource exampleFontSettings = new FontUIResource(new Font("MS Mincho", Font.PLAIN, 24));
java.util.Enumeration<Object> keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = UIManager.get(key);
if (value instanceof javax.swing.plaf.FontUIResource) {
UIManager.put(key, exampleFontSettings);
}
}
Where would I add this code?
This works before initializing booster.
UiBooster booster = new UiBooster(new Font("Comic Sans MS", Font.BOLD, 24));
booster.showInfoDialog("Some fancy information with crazy font");
This feature will be released with version 1.14.0. Thank you for the idea π
Nice work, I will change my code.
Be patient. The next release will still need a little timeπ
OK
On Wed, Sep 15, 2021 at 12:36 PM Nick @.***> wrote:
Be patient. The next release will still need a little timeπ
β You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Milchreis/UiBooster/issues/50#issuecomment-920181660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4RCZ77ZGMDQDHVVQB76FDUCDDSVANCNFSM5DYB7SDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Steven P. Goldsmith
Can you control the font size programmaticly? And in a global way?