问题
I used bold ttf font and it works but only half of the letters are seen.
Code:
public void start() {
if (current != null) {
current.show();
return;
}
Label testLabel = new Label("Bold Font Not Working");
testLabel.setUIID("smallBold");
Form splashForm = new Form(new BorderLayout());
splashForm.add(BorderLayout.CENTER, BoxLayout.encloseY(testLabel));
splashForm.show();
splashForm.revalidate();
}
UIID in theme for unselected, selected and pressed style
How it looks now
However without wrapping it in boxlayout or flowlayout and directly adding it in the form with borderlayout works. P.S if the form is in boxlayout, it doesn't work
Code:
public void start() {
if (current != null) {
current.show();
return;
}
Label testLabel = new Label("Bold Font Not Working");
testLabel.setUIID("smallBold");
Form splashForm = new Form(new BorderLayout());
splashForm.add(BorderLayout.CENTER, testLabel);// this works
splashForm.show();
splashForm.revalidate();
}
Image when the label is not wrapped in other containers
来源:https://stackoverflow.com/questions/53465390/only-half-of-the-letters-of-the-component-are-seen-cn1