Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Garbled text in the process window #651

Open
stephanecoder opened this issue Mar 27, 2021 · 0 comments
Open

Garbled text in the process window #651

stephanecoder opened this issue Mar 27, 2021 · 0 comments

Comments

@stephanecoder
Copy link

stephanecoder commented Mar 27, 2021

Hello,

I have this issue running a simple JavaFX code. Any idea how to fix it? I'm using Java v16 with JavaFX 16 on Windows 10 FR_CI.

javafx2

The same issue is also showing in my IDE:

scene builder

The code I'm using:

package sample;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.Button;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        Button btn = new Button();
        btn.setText("Say 'Hello World'!");
        StackPane root_ctn = new StackPane();
        root_ctn.getChildren().add(btn);
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent actionEvent) {
                System.out.println("Hello World!");
            }
        });
        primaryStage.setTitle("Hello World");
        primaryStage.setScene(new Scene(root_ctn, 300, 275));
        primaryStage.show();
    }


    public static void main(String[] args) {
        launch(args);
    }

}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant