javax.swing.JFileChooser.setLocation()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中javax.swing.JFileChooser.setLocation()方法的一些代码示例,展示了JFileChooser.setLocation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.setLocation()方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:setLocation

JFileChooser.setLocation介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(_projectsBaseDir.getPath());
fc.setLocation(50,50);
int ret = fc.showOpenDialog(this); // Use .showSaveDialog(this) for save dialog
if(ret == JFileChooser.APPROVE_OPTION)
  File selectedFile = fc.getSelectedFile();

代码示例来源:origin: MegaMek/megamek

private File selectGameOptionsFile(boolean saveDialog) {
  JFileChooser fc = new JFileChooser("mmconf"); //$NON-NLS-1$
  fc.setLocation(getLocation().x + 150, getLocation().y + 100);

代码示例来源:origin: MegaMek/megamek

JFileChooser fc = new JFileChooser("data" + File.separator + "boards");
fc
    .setLocation(frame.getLocation().x + 150,
        frame.getLocation().y + 100);
fc.setDialogTitle(Messages.getString("BoardEditor.saveBoardAs"));

代码示例来源:origin: MegaMek/megamek

JFileChooser fc = new JFileChooser(".");
fc
    .setLocation(frame.getLocation().x + 150,
        frame.getLocation().y + 100);
fc.setDialogTitle(Messages.getString("BoardEditor.saveAsImage"));

代码示例来源:origin: MegaMek/megamek

dlgSaveList.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
dlgSaveList.setDialogTitle(Messages.getString("ClientGUI.saveUnitListFileDialog.title"));
FileNameExtensionFilter filter = new FileNameExtensionFilter("Mul Files", "mul");

代码示例来源:origin: MegaMek/megamek

fc.setLocation(frame.getLocation().x + 150,
        frame.getLocation().y + 100);
fc.setDialogTitle(Messages.getString("BoardEditor.saveAsImage"));

代码示例来源:origin: MegaMek/megamek

JFileChooser fc = new JFileChooser("data" + File.separator + "boards");
fc
    .setLocation(frame.getLocation().x + 150,
           frame.getLocation().y + 100);
fc.setDialogTitle(Messages.getString("BoardEditor.saveBoardAs"));

代码示例来源:origin: MegaMek/megamek

dlgSaveList.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
dlgSaveList.setDialogTitle(Messages.getString("ClientGUI.saveUnitListFileDialog.title"));
FileNameExtensionFilter filter = new FileNameExtensionFilter("Mul Files", "mul");

代码示例来源:origin: net.sf.ingenias/editor

jfc.setLocation(getCenter(resources.getMainFrame().getSize()));
jfc.showDialog(resources.getMainFrame(), "Save");
File sel = jfc.getSelectedFile();

代码示例来源:origin: MegaMek/megamek

public void boardLoad() {
  JFileChooser fc = new JFileChooser("data" + File.separator + "boards");
  fc
      .setLocation(frame.getLocation().x + 150,
             frame.getLocation().y + 100);
  fc.setDialogTitle(Messages.getString("BoardEditor.loadBoard"));

代码示例来源:origin: net.sf.ingenias/editor

jfc.setLocation(GraphicsUtils.getCenter(resources.getMainFrame(),jfc.getSize()));
jfc.showOpenDialog(resources.getMainFrame());
final File input = jfc.getSelectedFile();

代码示例来源:origin: MegaMek/megamek

void loadGame() {
  JFileChooser fc = new JFileChooser("savegames");
  fc.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
  fc.setDialogTitle(Messages.getString("MegaMek.SaveGameDialog.title"));
  fc.setFileFilter(new FileFilter() {

代码示例来源:origin: net.sf.ingenias/editor

File sel = null;
while (invalidFolder) {
  jfc.setLocation(DialogWindows.getCenter(resources.getMainFrame().getSize(),resources.getMainFrame()));
  jfc.showSaveDialog(resources.getMainFrame());
  sel = jfc.getSelectedFile();

代码示例来源:origin: MegaMek/megamek

ignoreHotKeys = true;
JFileChooser fc = new JFileChooser("./savegames");
fc.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
fc.setDialogTitle(Messages.getString("ClientGUI.FileSaveDialog.title"));

代码示例来源:origin: MegaMek/megamek

dlgLoadList.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
dlgLoadList.setDialogTitle(Messages.getString("ClientGUI.openUnitListFileDialog.title"));
dlgLoadList.setFileFilter(new FileFilter() {

代码示例来源:origin: MegaMek/megamek

JFileChooser fc = new JFileChooser("data" + File.separatorChar
    + "scenarios");
fc.setLocation(frame.getLocation().x + 150, frame.getLocation().y + 100);
fc.setDialogTitle(Messages
    .getString("MegaMek.SelectScenarioDialog.title"));

相关文章

JFileChooser类方法