JTextPane: How to set the font size

ぐ巨炮叔叔 提交于 2019-12-01 18:30:49

Sure, you can create a font object and use it to set the font of your text pane. Instantiate it like this:

    Font f = new Font(Font.SANS_SERIF, 3, 5);
mKorbel

Maybe this code will help you, about Highlighter and StyledDocument, rest is described in the tutorial about JTextPane / EditorPane

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