I am wanting to use this package to show some JavaScript code. I wished to change the font and font-size for my CodeArea control and coded:
codeArea = new CodeArea();
codeArea.setFont(Font.font("consolas", 11.0));
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));
However, when the control is shown, the font doesn't change but the size is fine however the moment I type a character, the font size changes back to the default. I think I am missing how to set the font for the control as a whole. Would you be able to advise?
I am wanting to use this package to show some JavaScript code. I wished to change the font and font-size for my CodeArea control and coded:
However, when the control is shown, the font doesn't change but the size is fine however the moment I type a character, the font size changes back to the default. I think I am missing how to set the font for the control as a whole. Would you be able to advise?