Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I have blank squares instead of Farsi characters as the text of MenuItem label on PopupMenu  RSS feed

 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
As i started programming by jdk6, i had no problem in text components neither in awt nor in swing.
But for labels or titles of AWT components, yes :
I couldn't have Farsi characters displayable on AWTs just as simple as Swing by typing them into the source code.
lets check this SSCCE :

Yes, i know each of three approaches in source code does right when you may test it from IDE , but if you make a JAR contains just this class (and its resources) by means of NetBeans > project > clean&build ,you won't see the expected characters and will just get EMPTY/BLANK SQUARES !
Unfortunately, opposed to other situations i encountered before, here there is no way to avoid using awt and make use of Swing in this case.
And this was just an SSCCE i made to show the problem and my recent (also first ) application suffers from this subject.

i am using latest version of Netbeans IDE.

Thank you very much in advance.

edited: seems i can not attach anything except of images ! also no matter what icon image should be placed.you would have to put an image,the issue is something else
other thing: i wrapped this class as as a project and blank/empty squares just related to HardCoding and from other two approaches i get garbage ...
 
Rob Spoor
Sheriff
Posts: 20904
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not an SSCCE - it's not self-contained. Without files farsiLabels.properties and greenIcon.png we can't run that program.
 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:That's not an SSCCE - it's not self-contained. Without files farsiLabels.properties and greenIcon.png we can't run that program.

I tried as mentioned when edited my post. i tried to attach a zip file containing required files, after i got not allowed message, searched the ranch to find out what's allowed !? and there were many posters had the same ask...
in the office forum i saw just images allowed so what should/can i do ?May be you don't like to get to a link elsewhere to get files ? if not so let me know please

After edition:

The contents of text file is this one line :
and
The contents of Properties file is this :

I know here they may not seem well, but in my Farsi enabled Windows, these contents are fine
greenIcon.PNG
[Thumbnail for greenIcon.PNG]
 
Esmaeil Ashrafi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there,hope you all are fine...
i just posted this thread another where and just wanted to inform you, but still i will watch here, if somebody would help

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!