How can I add the StyledEditorKit class to a JCombobox? I would like to be able to change the font size of a text inside a JTextPane and the sizes are loaded inside a JComboBox. I have something like this:
String tamano[] = {"12","13","14"};
JComboBox cb = new JComboBox(tamano);
cb.addActionListener(StyledEditorKit.FontSizeAction("cambiar", Integer.paraseInt((String) cb.getSelectedItem)));
But it's not working.
I see that you try to change the size of the text depending on the value defined in the JComboBox , to do it it would be as follows: