posted 24 years ago
I assume you saw methods like setApproveButtonText() and setDialogTitle(). Unfortunately there doesn't appear to be one for the "Look in" label. It appears that this is part of the metal look and feel. There's probably an easy way to do this, but I haven't found it yet, so I'll just share what I've learned so far:
I'd download a copy of the jdk source for 1.2.2 or 1.3 - I'm looking at 1.3. Search for "Look in" (no quotes) as contained text - there's a file src\share\classes\javax\swing\plaf\metal\resources\metal.properties which contains the strings used for labels by JFileChooser. I assume there's a copy of this file inside one of the jar files in the jdk. So now you need to figure out how to make your own custom look and feel, preferably by just overriding specific properties of the metal look and feel. I think this is as simple as using the UIManager.put() method:
UIManager.put("FileChooser.lookInLabelText", "Look in");
(put your own text in place of "Look in" of course.) You'll need to look at that metal.properties file to get a complete list of proerties you can set. (Well, there's probably also a way to make the machine print them out for you.)
Unfortunately, that's all I have time to figure out now. Good luck - and please let me know if it works, or if you find some other trick to accomplish what you need.
"I'm not back." - Bill Harding, Twister