2

I am having a an issue with a TextArea (using JavaFX 8).

The problem is that when I create a TextArea the text is blurry, I have looked through other posts and cannot find a solution.

I thought maybe it is me so I loaded up Scene Builder and created an anchor pane with a TextArea and this still is blurry.

My theory is that is may be a bug with JavaFX 8 but im not too sure so I have decided to ask, here is the code I use:

    SplitPane splitPane = new SplitPane();
    VBox vbox = new VBox();
    HBox hbox = new HBox();
    TextArea note = new TextArea();
    note.setPrefHeight(100);

    vbox.setPadding(new Insets(0, 10, 0, 10));

    hbox.setPadding(new Insets(10, 0, 10, 0));
    hbox.setSpacing(8);

    splitPane.setPrefSize(1024, 300);
    splitPane.setOrientation(Orientation.HORIZONTAL);
    splitPane.setDividerPosition(0, 0.7);

    hbox.getChildren().add(new TextField());
    hbox.getChildren().add(new TextField());
    hbox.getChildren().add(new TextField());

    vbox.getChildren().add(hbox);
    vbox.getChildren().add(note);

    splitPane.getItems().addAll(vbox, new TextArea());

    accountNotesPane.getChildren().add(splitPane);

    accountNotesPane.setTopAnchor(splitPane, 10.0);
    accountNotesPane.setLeftAnchor(splitPane, 10.0);
    accountNotesPane.setRightAnchor(splitPane, 10.0);
    accountNotesPane.setBottomAnchor(splitPane, 10.0);

Here is Screenshot from my app:

enter image description here

And here is one from Scene Builder:

enter image description here

Any help would be greatly appreciated,

Cheers.

RJK
  • 151
  • 8
  • what do you mean by `blurry`? I just see another font and shadow - it's a question of styles applied to the scene. – nikis Jun 24 '14 at 10:48
  • Its had no styles applied to it, its just a bog standard TextArea, I have tried to apply different font styles etc.. but nothing is working. – RJK Jun 24 '14 at 10:49
  • I have encountered this issue before, on both regular TextAreas and styled ones. I was unable to make it go away through any styling or tweaking. The only thing that comes to mind is if you run your application with Java 8, but set the user stylesheet to Caspian in your app, which is what I did. I now use Modena and have not seen the issue. – CAG Gonzo Jun 25 '14 at 19:31
  • Did you try putting your splitpane into a simpler layout? Maybe the issue is cased by your scene host (Swing parent?). I can't reproduce the issue on mac retina with jdk1.8.0_31 when i put your layout right into primary stage. – Andrew Butenko Feb 27 '18 at 04:22
  • Does this answer your question? [Blurred text in JavaFX TextArea](https://stackoverflow.com/questions/23728517/blurred-text-in-javafx-textarea) – Dave Jarvis Aug 17 '20 at 02:13

0 Answers0