![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e898. Changing the Text of the Approve Button in a JFileChooser DialogThe approve button is clicked by the user to indicate that the file has been selected. The default label for the approve button is eitherOpen or Save , depending on the dialog type. This label
can be changed.
JFileChooser chooser = new JFileChooser(); // Set the text chooser.setApproveButtonText("New Approve Text"); // Set the mnemonic chooser.setApproveButtonMnemonic('a'); // Set the tool tip chooser.setApproveButtonToolTipText("New Approve Tool Tip"); // Show the dialog; wait until dialog is closed chooser.showOpenDialog(frame);
e900. Displaying the Current Directory in the Title of a JFileChooser Dialog
© 2002 Addison-Wesley. |