Mega Code Archive

 
Categories / Java Tutorial / Swing
 

Set font for I18N to JTextArea

import java.awt.Font; import java.awt.GraphicsEnvironment; import javax.swing.JFrame; import javax.swing.JTextArea; public class JTextAreaI18N extends JFrame {   String davidMessage = "\u05E9\u05DC\u05D5\u05DD \u05E2\u05D5\u05DC\u05DD";   public JTextAreaI18N() {     GraphicsEnvironment.getLocalGraphicsEnvironment();     JTextArea textArea = new JTextArea(davidMessage);     textArea.setFont(new Font("LucidaSans", Font.PLAIN, 40));     this.getContentPane().add(textArea);     textArea.setVisible(true);   }   public static void main(String[] args) {     JFrame frame = new JTextAreaI18N();     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.pack();     frame.setVisible(true);   } }