Search code examples
javaswingnetbeans6.8

Where do I localize strings in some of the menu items with Netbeans?


So I made a standard swing application in Netbeans 6.8 but I can't find where the resource file that defines the localized string for the Exit menu item under File.

It doesn't seem to be defined among the resource files in <project>/resources. Is this a standard string somewhere or am I missing something?


Solution

  • The "Exit" string doesn't get defined as a localized string like the File menu item -- it gets generated into code through the Netbeans GUI builder. That is why you don't see it in the properties file.

    If you open the file {ProjectName}View.java you can see that it gets defined through the netbeans GUI builder. Click on the file menu and then the exit menu item in the GUI builder and you can look at the properties of the swing item. One of the properties is the text of the JMenuItem.

    Then these properties get generated into code.