Reputation: 1738
I have a JComboBox
which populate font name. Like this image :
How to change the font family in JComboBox
value according to font name?
Upvotes: 0
Views: 517
Reputation: 59660
You can use a custom cell renderer for the ComboBox, where you can return a JLabel to be displayed in JComboBox, and in renderer's method you can change font of specific label based on it's value, in your case the font name will be the value.
Upvotes: 3