Unicode: TrueType Font Test : Code Unicode : Development Class : Java examples (example source code) Organized by topic

Java
C++
PHP
Java Home »  Development Class   » [  Code Unicode  ]  Screenshots 
 



Unicode: TrueType Font Test




/*
Java Internationalization
By Andy Deitsch, David Czarnecki

ISBN: 0-596-00019-7
O'Reilly
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class TrueTypeTest extends JFrame {

  private String textMessage = "Java Internationalization";

  public TrueTypeTest() {
    super("TrueType Font Demonstration");

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    ge.getAllFonts();

    Font font = new Font("Jokerman", Font.PLAIN, 35);
    JLabel textLabel = new JLabel(textMessage);
    textLabel.setFont(font);

    getContentPane().add(textLabel);
    show();
  }

  public static void main(String[] args) {
    JFrame frame = new TrueTypeTest();
    frame.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {System.exit(0);}
    });

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



           
       
Related examples in the same category
1.  Unicode sorting Unicode sorting
2.  Unicode: Fonts and Text Rendering Unicode: Fonts and Text Rendering
3.  Unicode: test layout Unicode: test layout
4.  Conversion between Unicode characters and Strings Conversion between Unicode characters and Strings
5.  Convert among Unicode, ASCII and byte/int Convert among Unicode, ASCII and byte/int
6.  Unicode - show a page of Unicode characters
7.  Vis - make special characters visible
8.  Demonstrate creating readers and writers with a specific encoding
9.  TextArea with Unicode TextArea with Unicode
10.  Unicode display Unicode display
11.  Internationalized Graphical User Interfaces: unicode cut and paste Internationalized Graphical User Interfaces: unicode cut and paste
12.  Stream Converter Unicode Stream Converter Unicode
13.  String Converter Unicode String Converter Unicode








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.