JPanel () { JPanel panel = new JPanel(); panel.setLayout(new GridBagLayout()); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.fill = GridBagConstraints.HORIZONTAL; JLabel promptLabel = new JLabel(IdeBundle.message("editbox.export.to.file")); gbConstraints.weightx = 0; panel.add(promptLabel, gbConstraints); gbConstraints.weightx = 1; panel.add(myTfFile, gbConstraints); String defaultFilePath = myExporter.getDefaultFilePath(); if (!new File(defaultFilePath).isAbsolute()) { defaultFilePath = PathMacroManager.getInstance(myProject).collapsePath(defaultFilePath); } myTfFile.setText(FileUtil.toSystemDependentName(defaultFilePath)); panel.setBorder(JBUI.Borders.emptyBottom(5)); return panel; }