Safe References to Bundle Keys on the NetBeans Platform
By Geertjan on Nov 28, 2010
Wouldn't it be much better if you could refer to a String in a Bundle class instead, i.e., instead of referring to a key in a Bundle.properties file?
Only if the String actually exists, will it be available in code completion. And if you make a typo, the file won't compile and a red error message is shown in the editor.
It's not very hard to set things up, as described in a very nice article by Edvin Syse, entitled NbBundle on Steroids Using Annotation Processors.