Posts Tagged ‘bold text’
Setting a Bold and Colorize Text
this is how to create a RichTextField with style Bold and Red color.
RichTextField rtf = new RichTextField(element,RichTextField.TEXT_ALIGN_LEFT){ // Override the paint method to set Color. public void paint(Graphics graphics) { graphics.setColor(Color.RED); super.paint(graphics); } }; rtf.setFont(Font.getDefault().derive(Font.BOLD));