mac10.8.2-x64 8b71(64bit)
sun/security/tools/policytool/i18n.sh
It has same issue,there is no filename field.
|
|
|
mac10.8.2-x64 7u12b05(64bit)
sun/security/tools/policytool/i18n.sh
It has same issue: there is no filename field.refer to i18n.jpg
|
|
|
EVALUATION
I like setting the SAVE_DIALOG type in the printing code,
since printing to file always needs the file name
|
|
|
EVALUATION
I think I see the problem.
JFileChooser defaults to being an "Open" dialog. Printing needs
to use it as a "Save" dialog so you can create the new file.
Metal and I guess Windows L&F always show the editable file name field,
so its not mattered. Aqua seems to be quite different in this regard.
I can fix it in printing code by adding
jfc.setDialogType(JFileChooser.SAVE_DIALOG);
I don't think this will cause any new problems.
I do not have a definite explanation why this was not a problem in
Apple JDK6 other than to speculate that since this afflicted Apple
users that it was fixed in ServiceDialog.java there but never
made it back to us or into the JDK 7 OS X port code ???
|
|
|
EVALUATION
I assigned it back to get more information from the 2d side:
How does the test case provided in the previous post
connect with the desribed bug?
The FC test hangs on my machine when I run it,
however if I wrap it with Runnable and invoke it on EDT
the dialog is shown as expected.
import javax.swing.*;
import java.io.*;
public class FC {
public static void main(String args[]) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
JFileChooser jfc = new JFileChooser();
jfc.setSelectedFile(new File("foo.txt"));
jfc.setApproveButtonText("Print");
jfc.setDialogTitle("Print to file");
jfc.showDialog(null, null);
}
});
}
}
The sun.print.ServiceDialog seems to be driven by the various settings
so it is not clear if this is a Swing problem
Feel free to reassign it back
|
|
|
EVALUATION
This seems to be a generic problem with the Swing file chooser likely specific to Aqua.
Printing just happens to use that dialog/chooser.
It does seem to be a regression as it was OK with JDK6
Just run this program :
import java.io.*;
import javax.swing.*;
public class FC {
public static void main(String args[]) {
JFileChooser jfc = new JFileChooser();
jfc.setSelectedFile(new File("foo.txt"));
jfc.setApproveButtonText("Print");
jfc.setDialogTitle("Print to file");
jfc.showDialog(null, null);
}
}
|
|
|