Tamil Font Usage in java using Unicode for Tamil


The code given below demonstrates the usage of Tamil Font (Latha) in java by applying Unicode for each character in Tamil and displays the font in container using applet.

  • Filename: TamilFont.java

import java.io.*;
import javax.swing.*;
import java.awt.*;
public class TamilFont extends JApplet {
public void init()
String content="\u0BB5\u0BA3\u0B95\u0BCD\u0B95\u0BAE\u0BCD";
Container container=getContentPane();
container.setLayout(new FlowLayout());
JLabel label1=new JLabel();
label1.setFont(new Font("Latha",Font.PLAIN,12));