Java Swing字体选择器 [英] Java Swing Font Chooser

查看:573
本文介绍了Java Swing字体选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Java Swing应用程序中,我想允许用户选择他们的字体。令我惊讶的是,没有用于选择字体的核心swing库。我期望找到一个JFileChooser,但没有这样的实用程序。这看起来像是一个简单的对话框,我确信它存在于那里。我真的不想自己写。

In my Java Swing application I want to allow the user to pick their font. To my surprise there is no core swing library to pick fonts. I expected to find a JFileChooser but there is no such utility. This seems like a simple dialog that I'm sure exists out there. I do not really want to write it myself.

我在互联网上环顾四周,发现了这种对话的几种不同的实现方式。问题是大多数是随机博客或只是代码片段。我正在寻找一个经过充分利用和测试的库的一部分。它还需要有商业友好许可证。

I looked around on the internet and found a few different implementations of this type of a dialog. The problem is most of them are on random blogs or are just code snippets. I am looking for something that is part of a library that is well used and tested. It also needs to have a commercial friendly license.

有没有人知道他们可以推荐的好的Java文件选择器?

Does anyone know of a good Java file chooser in swing that they can recommend?

推荐答案

JFontChooser 看起来很不错,而且是开源的。

JFontChooser looks pretty good and is open-source.

这篇关于Java Swing字体选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆