UnicodeText.java Source code

Java tutorial

Introduction

Here is the source code for UnicodeText.java

Source

import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;

import javax.swing.JFrame;

public class UnicodeText {
    public static void main(String[] args) {
        JFrame f = new JFrame() {
            public void paint(Graphics g) {
                Graphics2D g2 = (Graphics2D) g;
                g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

                Font font = new Font("Lucida Sans Regular", Font.PLAIN, 32);

                g2.setFont(font);
                g2.drawString("\u032e\u0624\u0639", 40, 80);
            }
        };
        f.setSize(200, 200);
        f.setVisible(true);
    }
}