Java GUI Programming

how to set unicode(sinhala) font to JoptionPane in java / customize JoptionPane

Hi all now i am going to say you how to customize the JoptionPane in java. In here i  added Unicode type font to my message. Now we will see how to do it. Below you can see how you can customize your code for Unicode font..

String html =
            "<html><p><font color=\"#000\" " +
            "size=\"5\" face=\"Iskoola pota\">ආයුබෝවන් මෙම පනිවිඩය ඔබට සින්හලෙන් දිස්වන්නේ<br /> මෙම ජාවා වැඩසටහන සින්හල වැඩසටහනක්<br /> ලෙස සකසා ඇති නිසාය.." +
            "</font></p></html>";

        JOptionPane.showMessageDialog(null, html,"තොරතුරු පනිවිඩය",JOptionPane.INFORMATION_MESSAGE);

How nice it has changed know.. OK friends we will see in next post..

One thought on “how to set unicode(sinhala) font to JoptionPane in java / customize JoptionPane

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s