4 Replies Latest reply on Mar 25, 2013 12:05 AM by 998863

    JFileChooser - translating to another language

    905708
      Hi,

      Java doesn't support my language so I must manually translate whole window. I translated almost everything using functions like this:
      UIManager.put("FileChooser.openButtonText", "............");
      I don't know how to:
      1) change default title of new folder ("New Folder")
      2) translate right-click context menu (View, Refrest, New Folder)
      3) add to this context menu Delete option

      I would be grateful for any help :)
        • 1. Re: JFileChooser - translating to another language
          Jörg
          1) Not sure what you mean, but the title is determined by the approveButtonText in showDialog(Component parent, String approveButtonText).

          2) UIManager.put("FileChooser.viewMenuLabelText", "your text here");
          UIManager.put("FileChooser.listViewActionLabelText", ...
          UIManager.put("FileChooser.detailsViewActionLabelText", ...
          UIManager.put("FileChooser.refreshActionLabelText", ...

          3) This is no API functionality. So you have to write (extend) your own FileChooser.
          • 2. Re: JFileChooser - translating to another language
            905708
            Jörg wrote:
            1) Not sure what you mean, but the title is determined by the approveButtonText in showDialog(Component parent, String approveButtonText).

            2) UIManager.put("FileChooser.viewMenuLabelText", "your text here");
            UIManager.put("FileChooser.listViewActionLabelText", ...
            UIManager.put("FileChooser.detailsViewActionLabelText", ...
            UIManager.put("FileChooser.refreshActionLabelText", ...

            3) This is no API functionality. So you have to write (extend) your own FileChooser.
            1) I would like to change the default name of new folder which is created when I click on New Folder button in JFileChooser

            2) Thx, that is what I needed :)
            • 3. Re: JFileChooser - translating to another language
              Jörg
              default name of new folder which is created when I click on New Folder button
              With regret, but again the answer to 3) applies.
              • 4. Re: JFileChooser - translating to another language
                998863
                Hi,

                It's extremely difficult to find all the documentation regarding JFileChooser... About the context menu, there is still one key missing... "the go up" option.

                Anyone can provide this key?

                Thanks!