I’m learning how to program in MicroEJ making some samples, now I’m trying to change the font color but the program don’t recongnize setForecolor command to use.
public static void main(String[] args) {
MicroUI.start();
Desktop d = new Desktop();
Label lbl1 = new Label("This is an example using flow container"); //$NON-NLS-1$
Label lbl2 = new Label("flow container can be used in vertical or horizontal position"); //$NON-NLS-1$
Label lbl3 = new Label("as you wish use"); //$NON-NLS-1$
// style
CascadingStylesheet stylesheet = new CascadingStylesheet();
EditableStyle style = stylesheet.getSelectorStyle(new TypeSelector(Label.class));
Font font = Font.getFont("/Fonts/AlarmClockFont.ejf");
style.setFont(font);
style.setBorder(new RectangularBorder(Colors.PURPLE, 2));
style.setBackground(new ImageBackground(Image.getImage("/images/NLights.png")));
// flow container
Flow flowContainer = new Flow(LayoutOrientation.VERTICAL);
flowContainer.addChild(lbl1);
flowContainer.addChild(lbl2);
flowContainer.addChild(lbl3);
d.setStylesheet(stylesheet);
d.setWidget(flowContainer);
d.requestShow();
}
}