本文整理了Java中java.awt.FileDialog.setAlwaysOnTop()
方法的一些代码示例,展示了FileDialog.setAlwaysOnTop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileDialog.setAlwaysOnTop()
方法的具体详情如下:
包路径:java.awt.FileDialog
类名称:FileDialog
方法名:setAlwaysOnTop
暂无
代码示例来源:origin: stackoverflow.com
JFrame frame= new JFrame();
frame.setAlwaysOnTop(true);
frame.setVisible(true);
FileDialog fd = new FileDialog(frame, "Save as", FileDialog.SAVE);
fd.setAlwaysOnTop(true);
fd.setVisible(true);
String path=fd.getDirectory().toString()+fd.getFile().toString();
input=cl.getResourceAsStream(total_employee_record);
report=JasperCompileManager.compileReport(input);
parameters.put("mypic",inputimage);
print=JasperFillManager.fillReport(report, parameters,new JRBeanCollectionDataSource(beanlist,false));
代码示例来源:origin: edu.toronto.cs.savant/savant-core
fd.setAlwaysOnTop(true);
String selectedFileName = fd.getFile();
if (selectedFileName != null) {
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
fd.setAlwaysOnTop(true);
String selectedFileName = fd.getFile();
if (selectedFileName != null) {
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
/**
* Prompt the user to save a file.
*
* @param parent window which will serve as the parent for this dialog
* @param title title of the dialog
* @param defaultName default file-name to appear in the dialog
* @return a File, or null if cancelled
*/
public static File chooseFileForSave(String title, String defaultName) {
FileDialog fd = getFileDialog(title, FileDialog.SAVE);
fd.setFile(defaultName);
fd.setAlwaysOnTop(true);
fd.setLocationRelativeTo(null);
fd.setVisible(true);
String selectedFile = fd.getFile();
if (selectedFile != null) {
return new File(fd.getDirectory(), selectedFile);
}
return null;
}
代码示例来源:origin: edu.toronto.cs.savant/savant-core
/**
* Prompt the user to save a file.
*
* @param title title of the dialog
* @param defaultName default file-name to appear in the dialog
* @param filter file-filter for controlling what appears in the dialog
* @param initialDir the default directory
* @return a <code>File</code>, or null if cancelled
*/
public static File chooseFileForSave(String title, String defaultName, FileFilter filter, File initialDir) {
FileDialog fd = getFileDialog(title, FileDialog.SAVE);
if (filter != null) {
fd.setFilenameFilter(new FilenameFilterAdapter(filter));
}
if (initialDir != null) {
fd.setDirectory(initialDir.getAbsolutePath());
}
fd.setFile(defaultName);
fd.setAlwaysOnTop(true);
fd.setVisible(true);
String selectedFile = fd.getFile();
if (selectedFile != null) {
return new File(fd.getDirectory(), selectedFile);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!