Displaying Unicode (Kannada) characters in HTMLEditor/ TextArea
909617Jan 8 2012 — edited Jan 17 2012Dear All,
I am newbie to JavaFX and also to java desktop ui applications. Was trying to create a simple text editor in Kannada but was unable to display the Kannada text in the editor. However, I gave the stage a Kannada title and that was displayed. Is there anything special I need to do (like setting encoding or something) to have the editor display Kannada fonts? Please help. Here is the code that I have written:
Group root = new Group();
Scene scene = new Scene(root, 800, 600, Color.WHITE);
primaryStage.setScene(scene);
primaryStage.setTitle("ಅಚ್ಚು ಕಲಿ"); // This text is displayed in the title of the window
HTMLEditor editor = new HTMLEditor();
editor.setHtmlText("ಇಲ್ಲಿ ಬರೆಯಿರಿ"); // This text shows up as boxes
root.getChildren().add(editor);
primaryStage.show();
Please help!
Thanks,
Sandeep.