Created
March 27, 2016 16:56
-
-
Save james-d/c41e08348e161ca5462f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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