java - displaying Unicode text from database to JTextArea -
i have database has text in multiple languages english, hindi, telugu, tamil, marathi.
english , hindi text displayed perfectly. when choose other languages telugu, tamil, shows square boxes.
jtextarea txtmessage = new jtextarea(); txtmessage.setlinewrap( true ); txtmessage.setwrapstyleword( true ); jscrollpane scrollpane = new jscrollpane(txtmessage); scrollpane.setbounds(93, 125, 226, 97); frame.getcontentpane().add(scrollpane); lang = cblanguage.getselecteditem().tostring(); string sql2 = "select message messages language = '"+lang+"';"; try { result = statement.executequery(sql2); while(result.next()){ txtmessage.settext(result.getstring(1)); } } catch (sqlexception e) { // todo auto-generated catch block e.printstacktrace(); }
how make display tamil , telugu fonts properly?