Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Button names from property file

 
Raj Moti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my swing application I want to get button names from property file
How I can proceed?
Thanks Inadvance
Raj
 
Kriti Garg
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Create a property file like buttonlabels.properties with key values pairs
by following en_Us (locale convetion)


and make a java file to read this file,Study PropertyResourceBundle
in util package ,by using this u can iterate over the and can create a hashmap which u can further refere in your View class.

read some locale specific expamples on Net for detail info.

bBye
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic