There are many great Swing components around, but we could not find a nice combobox for font selection, that includes not only the font names but also some preview characters and maybe a history of the recently selected fonts. You know such a combobox from OpenOffice.org and other word processors.
Well, here it is now. Our
FontChooserComboBox offers font preview, customizable preview strings, optionally a list of the recent fonts and even auto completion for the font name. And best of all, the code is public domain, so you can use it for whatever you want. However, if you improve it, please share your work with us!
Here is a demo video:
A webstart demo:
Here are the files:
- FontChooserComboBox.java (just the component, which is a single Java file)
- FontChooserComboBox.zip (Eclipse project with demo frame)
Comments are welcome :-)