on 8u5
textArea.setStyle("-fx-text-fill: black;" + "-fx-background-color: white;" +
"-fx-font-family: 'Lucida Console';" + "-fx-font-weight: bold;");
Doesn't produce bold text in the TextArea.
However, the above code changes the font and runs without errors.
Steps to demonstrate the issue:
1.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class TestCase extends Application {
@Override
public void start(Stage stage) {
BorderPane border = new BorderPane();
HBox hb = new HBox();
border.setTop(hb);
TextArea textArea = new TextArea();
textArea.setStyle( "-fx-text-fill: black;" +
"-fx-background-color: white;" +
"-fx-font-family: 'Lucida Console';" +
"-fx-font-weight: bold;");
hb.getChildren().addAll(textArea);
Scene scene = new Scene(border);
stage.setScene(scene);
stage.setResizable(false);
stage.show();
}
}
2. javac TestCase.java
3. java TestCase
4. it doesn't produce bold text in the TextArea
5. If I have supposedly taken out the quotes in the font family, the font is
bold
e.g -fx-font-family: Lucida Console;"
6. However, the text doesn't display in the font I selected.
textArea.setStyle("-fx-text-fill: black;" + "-fx-background-color: white;" +
"-fx-font-family: 'Lucida Console';" + "-fx-font-weight: bold;");
Doesn't produce bold text in the TextArea.
However, the above code changes the font and runs without errors.
Steps to demonstrate the issue:
1.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.*;
import javafx.stage.Stage;
public class TestCase extends Application {
@Override
public void start(Stage stage) {
BorderPane border = new BorderPane();
HBox hb = new HBox();
border.setTop(hb);
TextArea textArea = new TextArea();
textArea.setStyle( "-fx-text-fill: black;" +
"-fx-background-color: white;" +
"-fx-font-family: 'Lucida Console';" +
"-fx-font-weight: bold;");
hb.getChildren().addAll(textArea);
Scene scene = new Scene(border);
stage.setScene(scene);
stage.setResizable(false);
stage.show();
}
}
2. javac TestCase.java
3. java TestCase
4. it doesn't produce bold text in the TextArea
5. If I have supposedly taken out the quotes in the font family, the font is
bold
e.g -fx-font-family: Lucida Console;"
6. However, the text doesn't display in the font I selected.