Automatically increasing font size in Swing

半城伤御伤魂 提交于 2019-11-27 07:16:00

问题


I would like to know if there are methods of automatically increasing the font size based on the size of a component. I have this gui here: Hovewer if i increase the size of the frame, it becomes like this:

the font size doesn't increase. and i don't have an idea on how to make this work.

回答1:


Some L&Fs support a sizeVariant, illustrated here with com.apple.laf.AquaLookAndFeel. Alternatively, you can scale the font to fill the space allocated by your chosen layout, as shown here.



来源:https://stackoverflow.com/questions/17392183/automatically-increasing-font-size-in-swing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!