From the figure in the left, I try to draw a string, "สวัสดีครับ", but it was displayed as "??????????". By the way, If you enter your Thai texts via Netbeans' properties editor they will be displayed properly like the caption of JButton in my applet. (If you examined the designer generated sources, you would see escaped string instead of pure Thai text)
To fix the problem, right click on your java source file, click on properties, change the encoding to "utf-8".
After changed the file encoding, you have to close your file and reopen it. You can now edit your file and it will be saved as UTF-8.
But if you compile your file at this point, you will get something like "unmappable character for encoding XXX" error. There is one more little thing to change, Go to project properties window by right click on the project name in the project navigator and click on properties, Go to build->compile and add "-encoding utf-8" at the Additional Compiler Options.
This is my result,
This solution may apply to other foreign languages too.