Gurjit
Gurjit

Reputation: 564

How to type in different languages in JTextArea java?

I am working on java application where I have a JTextArea in which I want the user to input in Punjabi language.

At the backend, how does Java store that language and also could someone please make a small program illustrating that?

Upvotes: 2

Views: 328

Answers (1)

Benjamin
Benjamin

Reputation: 2286

You can setFont to JTextArea. You must install a Font in your system

JTextArea t=new JTextArea();
Font f=new Font("Shivaji02", Font.PLAINs, 10);
t.setFont(f);

enter image description here

Upvotes: 2

Related Questions