Source Code : Unicode: Fonts and Text Rendering

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Unicode: Fonts and Text Rendering

Unicode: Fonts and Text Rendering
     
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;

import javax.swing.JFrame;

public class DrawStringDemo extends JFrame {

  String message = "David says, "u05E9u05DCu05D5u05DD u05E2u05D5u05DCu05DD"";

  public DrawStringDemo() {
    super("DrawStringDemo");
  }

  public void paint(Graphics g) {
    Graphics2D graphics2D = (Graphics2D) g;
    GraphicsEnvironment.getLocalGraphicsEnvironment();
    Font font = new Font("LucidaSans", Font.PLAIN, 40);
    graphics2D.setFont(font);
    graphics2D.drawString(message, 50, 75);
  }

  public static void main(String[] args) {
    JFrame frame = new DrawStringDemo();

    frame.pack();
    frame.setVisible(true);
  }
}



           
         
    
    
    
    
  

Thank with us