Last active
May 19, 2016 21:26
-
-
Save amgaweda/b1e3c01d38a5afbc8b4ccec6426d83cf to your computer and use it in GitHub Desktop.
Unicode Display
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.scene.Scene; | |
import javafx.scene.layout.StackPane; | |
import javafx.scene.text.Font; | |
import javafx.scene.text.Text; | |
import javafx.stage.Stage; | |
public class UnicodeDisplay extends Application { | |
@Override | |
public void start(Stage stage) throws Exception { | |
StackPane pane = new StackPane(); | |
Text unicode = new Text("\u30C4"); | |
Font f = new Font(100); | |
unicode.setFont(f); | |
// This WILL display the Unicode | |
pane.getChildren().add(unicode); | |
Scene scene = new Scene(pane, 500, 500); | |
stage.setScene(scene); | |
stage.show(); | |
} | |
public static void main(String[] args) { | |
System.out.println("This will not display the character - \u30C4"); | |
launch(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment