Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
public class CyrillicAndLatin extends Application {
@Override
public void start(Stage primaryStage) {
Label helloEn = new Label("Hello");
Label helloRu = new Label("Здравствуйте");
Label goodbyeEn = new Label("Goodbye");
Label goodbyeRu = new Label("До свидания");
GridPane root = new GridPane();
root.setHgap(12);
root.setVgap(4);
root.addRow(0, helloEn, helloRu);
root.addRow(1, goodbyeEn, goodbyeRu);
root.setPadding(new Insets(16));
root.setAlignment(Pos.CENTER);
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.