Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing internationalization NetBeans

 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,


I'm about to change language in Swing application developed in NetBeans.
Have followed tutorials and there are now 2 bundles: Bundle.properties and Bundle_es_ES filled with message key, value pairs.
In design mode i'm able to change in Inspector the Design Local property and reached the Bundle_es_ES, but in run-time i haven't found the way?

How to change language via combo-box in run-time?


Regards

 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've done some improvement, need to:
Locale.setDefault(new Locale("en","US"))
and to load the resource bundle in the code again (with appropriate path), and to set the text on all elements on GUI;

Now, this work in NetBeans developer mode, but when i export Clean & Build the project to get .jar file, paths to Bundles are not recognized?
Strange that default language is loaded properly?

How to set paths to Bundles properly in NetBeans for exporting to external SWING .jar?


Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic