UIManager strings [duplicate]

2019-09-15 23:20发布

问题:

Possible Duplicate:
Location of String keys in L&F

This here is a line in my code:

UIManager.getString("FileChooser.saveButtonText", l);

This will return a string that represents text printed on save button of JFileChooser

Where does it fetch that string from? I tried digging around src.zip, but I couldn't find it...

回答1:

  1. have look at (methods are protected, then not accesible from outside)

    • JButton getDefaultButton(JFileChooser fc)

    • Method Summary

  2. better way(my view) could be to ignore BasicXxxUI and to derive JFileChooser to the elements, that returns JFileChoosers JComponents

  3. look for Custom JFilechooerUI and another list of methods