List of usage examples for java.awt FlowLayout LEFT
int LEFT
To view the source code for java.awt FlowLayout LEFT.
Click Source Link
From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java
/** * Builds and lays out the tool bar./*from www .j ava2s .com*/ * * @return See above. */ private JPanel buildToolBarLeft() { JPanel bar = new JPanel(new FlowLayout(FlowLayout.LEFT)); bar.add(closeButton); int plugin = ImporterAgent.runAsPlugin(); if (!(plugin == LookupNames.IMAGE_J_IMPORT || plugin == LookupNames.IMAGE_J)) { bar.add(Box.createHorizontalStrut(5)); bar.add(refreshFilesButton); } return bar; }
From source file:de.whiledo.iliasdownloader2.swing.service.MainController.java
protected void showAutoSyncSettings() { JCheckBox checkboxAutoSyncActive; JTextField fieldSyncInterval; JPanel panel = new JPanel(new BorderLayout()); {//ww w.j av a2 s .co m checkboxAutoSyncActive = new JCheckBox("Automatische Synchronisierung aktiv"); checkboxAutoSyncActive.setSelected(iliasProperties.isAutoSyncActive()); panel.add(checkboxAutoSyncActive, BorderLayout.NORTH); } { JPanel panel2 = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel2.add(new JLabel("Intervall in Minuten:")); fieldSyncInterval = new JTextField(String.valueOf(iliasProperties.getAutoSyncIntervalInSeconds() / 60), 20); panel2.add(fieldSyncInterval); panel.add(panel2, BorderLayout.CENTER); } { panel.add(new JLabel( "<html>Sie knnen das Programm auch ohne GUI laufen lassen.<br>Weitere Informationen hierzu erhalten Sie, wenn Sie das Programm folgendermaen starten<br>java -jar <name>.jar help</html>"), BorderLayout.SOUTH); } if (JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(mainFrame, panel, "Automatische Synchronisierung einstellen", JOptionPane.OK_CANCEL_OPTION)) { iliasProperties.setAutoSyncActive(checkboxAutoSyncActive.isSelected()); iliasProperties.setAutoSyncIntervalInSeconds(Integer.parseInt(fieldSyncInterval.getText()) * 60); saveProperties(iliasProperties); startOrStopAutoSync(); } }
From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java
/** * Builds and lays out the components./* ww w . jav a 2 s.co m*/ * * @return See above */ private JPanel buildPathComponent() { JLabel directoriesLabel = new JLabel(TEXT_DIRECTORIES_BEFORE_FILE); JPanel pathPanel = new JPanel(); pathPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); pathPanel.add(numberOfFolders); pathPanel.add(directoriesLabel); return pathPanel; }
From source file:us.paulevans.basicxslt.BasicXSLTFrame.java
/** * Builds the south panel/*from w ww . ja v a2 s. c om*/ * @return */ private JPanel buildSouthPanel() { JPanel transformBtnPanel; JPanel footerPanel; JPanel southPanel; JPanel panel; JLabel label; Font footerPanelFont; Font footerPanelFontBold; transformBtnPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); transformBtnPanel.add( transformBtn = new JButton(stringFactory.getString(LabelStringFactory.MAIN_FRAME_TRANSFORM_BTN))); transformBtnPanel .add(exitBtn = new JButton(stringFactory.getString(LabelStringFactory.MAIN_FRAME_EXIT_BTN))); footerPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); southPanel = new JPanel(new BorderLayout()); southPanel.add(transformBtnPanel, BorderLayout.CENTER); southPanel.add(footerPanel, BorderLayout.SOUTH); footerPanelFont = new Font("arial", Font.PLAIN, 12); footerPanelFontBold = new Font("arial", Font.BOLD, 12); footerPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel.add(label = new JLabel(stringFactory.getString(LabelStringFactory.MAIN_FRAME_CURRENT_CONFIGURATION))); label.setFont(footerPanelFontBold); label.setForeground(Color.BLUE); panel.add(currentConfigLabel = new JLabel(userPrefs.getConfiguration())); currentConfigLabel.setFont(footerPanelFont); footerPanel.add(panel); panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); panel.add(label = new JLabel(stringFactory.getString(LabelStringFactory.MAIN_FRAME_TOTAL_TRANSFORM_TIME))); label.setFont(footerPanelFontBold); label.setForeground(Color.BLUE); panel.add(transformTimeLabel = new JLabel(lastTotalTransformTime + " " + stringFactory.getString(LabelStringFactory.MAIN_FRAME_MILLISECONDS_ABBREVIATION))); transformTimeLabel.setFont(footerPanelFont); footerPanel.add(panel); transformTimeLabel.setFont(footerPanelFont); footerPanel.add(new JLabel("")); footerPanel.add(new JLabel("")); transformBtn.addActionListener(this); exitBtn.addActionListener(this); return southPanel; }
From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java
/** * Builds and lays out the pixels size options. * //from w ww .j a v a 2 s .com * @return See above. */ private JPanel buildPixelSizeComponent() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); p.setBorder(BorderFactory.createTitledBorder("Pixels Size Defaults")); JLabel l = new JLabel(); l.setText("Used if no values included in the file:"); p.add(UIUtilities.buildComponentPanel(l)); JPanel row = new JPanel(); row.setLayout(new FlowLayout(FlowLayout.LEFT)); l = new JLabel(); l.setText("X: "); row.add(l); row.add(pixelsSize.get(0)); l = new JLabel(); l.setText("Y: "); row.add(l); row.add(pixelsSize.get(1)); l = new JLabel(); l.setText("Z: "); row.add(l); row.add(pixelsSize.get(2)); p.add(row); return UIUtilities.buildComponentPanel(p); }
From source file:org.apache.jmeter.visualizers.StatGraphVisualizer.java
private JPanel createGraphColumnPane() { JPanel colPanel = new JPanel(); colPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); JLabel label = new JLabel(JMeterUtils.getResString("aggregate_graph_columns_to_display")); //$NON-NLS-1$ colPanel.add(label);// ww w . j av a 2 s . c o m for (BarGraph bar : eltList) { colPanel.add(bar.getChkBox()); colPanel.add(createColorBarButton(bar, eltList.indexOf(bar))); } colPanel.add(Box.createRigidArea(new Dimension(5, 0))); chooseForeColor.setFont(FONT_SMALL); colPanel.add(chooseForeColor); chooseForeColor.addActionListener(this); JPanel optionsPanel = new JPanel(); optionsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); optionsPanel.add(createGraphFontValuePane()); optionsPanel.add(drawOutlinesBar); optionsPanel.add(numberShowGrouping); optionsPanel.add(valueLabelsVertical); JPanel barPane = new JPanel(new BorderLayout()); barPane.add(colPanel, BorderLayout.NORTH); barPane.add(Box.createRigidArea(new Dimension(0, 3)), BorderLayout.CENTER); barPane.add(optionsPanel, BorderLayout.SOUTH); JPanel columnPane = new JPanel(new BorderLayout()); columnPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("aggregate_graph_column_settings"))); // $NON-NLS-1$ columnPane.add(barPane, BorderLayout.NORTH); columnPane.add(Box.createRigidArea(new Dimension(0, 3)), BorderLayout.CENTER); columnPane.add(createGraphSelectionSubPane(), BorderLayout.SOUTH); return columnPane; }
From source file:ffx.ui.ModelingPanel.java
private void initialize() { // Command Description descriptTextArea = new JTextArea(); descriptTextArea.setEditable(false); descriptTextArea.setLineWrap(true);/*from www. j a va 2 s . c o m*/ descriptTextArea.setWrapStyleWord(true); descriptTextArea.setDoubleBuffered(true); Insets insets = descriptTextArea.getInsets(); insets.set(5, 5, 5, 5); descriptTextArea.setMargin(insets); descriptScrollPane = new JScrollPane(descriptTextArea, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); descriptScrollPane.setBorder(etchedBorder); // Command Input commandTextArea = new JTextArea(); commandTextArea.setEditable(false); commandTextArea.setLineWrap(true); commandTextArea.setWrapStyleWord(true); commandTextArea.setDoubleBuffered(true); commandTextArea.setMargin(insets); // Command Options optionsTabbedPane = new JTabbedPane(); statusLabel = new JLabel(); statusLabel.setBorder(etchedBorder); statusLabel.setToolTipText(" Modeling command that will be executed"); commandPanel = new JPanel(flowLayout); commandPanel.add(optionsTabbedPane); splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, commandPanel, descriptScrollPane); splitPane.setContinuousLayout(true); splitPane.setResizeWeight(1.0d); splitPane.setOneTouchExpandable(true); setLayout(new BorderLayout()); add(splitPane, BorderLayout.CENTER); add(statusLabel, BorderLayout.SOUTH); // Initialize the Amino/Nucleic Acid ComboBox. acidComboBox.setEditable(false); acidComboBox.setMaximumSize(sizer.getPreferredSize()); acidComboBox.setPreferredSize(sizer.getPreferredSize()); acidComboBox.setMinimumSize(sizer.getPreferredSize()); acidComboBox.setFont(Font.decode("Monospaced")); acidTextField.setMaximumSize(sizer.getPreferredSize()); acidTextField.setMinimumSize(sizer.getPreferredSize()); acidTextField.setPreferredSize(sizer.getPreferredSize()); acidTextArea.setEditable(false); acidTextArea.setWrapStyleWord(true); acidTextArea.setLineWrap(true); acidTextArea.setFont(Font.decode("Monospaced")); acidScrollPane = new JScrollPane(acidTextArea); Dimension d = new Dimension(300, 400); acidScrollPane.setPreferredSize(d); acidScrollPane.setMaximumSize(d); acidScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // Load the FFX commands.xml file that defines FFX commands. try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); db.setEntityResolver(new DTDResolver()); URL comURL = getClass().getClassLoader().getResource("ffx/ui/commands/commands.xml"); Document doc = db.parse(comURL.openStream()); NodeList nodelist = doc.getChildNodes(); Node commandroot = null; for (int i = 0; i < nodelist.getLength(); i++) { commandroot = nodelist.item(i); if (commandroot.getNodeName().equals("FFXCommands") && commandroot instanceof Element) { break; } } if (commandroot == null || !(commandroot instanceof Element)) { commandList = null; } commandList = ((Element) commandroot).getElementsByTagName("Command"); } catch (ParserConfigurationException | SAXException | IOException e) { System.err.println(e); } finally { if (commandList == null) { System.out.println("Force Field X commands.xml could not be parsed."); logger.severe("Force Field X will exit."); System.exit(-1); } } // Create a ComboBox with commands specific to each type of coordinate // file. xyzCommands = new JComboBox<>(); intCommands = new JComboBox<>(); arcCommands = new JComboBox<>(); pdbCommands = new JComboBox<>(); anyCommands = new JComboBox<>(); Element command; String name; int numcommands = commandList.getLength(); for (int i = 0; i < numcommands; i++) { command = (Element) commandList.item(i); name = command.getAttribute("name"); String temp = command.getAttribute("fileType"); if (temp.contains("ANY")) { temp = "XYZ INT ARC PDB"; anyCommands.addItem(name); } String[] types = temp.split(" +"); for (String type : types) { if (type.contains("XYZ")) { xyzCommands.addItem(name); } if (type.contains("INT")) { intCommands.addItem(name); } if (type.contains("ARC")) { arcCommands.addItem(name); } if (type.contains("PDB")) { pdbCommands.addItem(name); } } } initCommandComboBox(xyzCommands); initCommandComboBox(intCommands); initCommandComboBox(arcCommands); initCommandComboBox(pdbCommands); initCommandComboBox(anyCommands); currentCommandBox = anyCommands; activeCommand = (String) anyCommands.getSelectedItem(); // Load the default Command. loadCommand(); // Load the default Log File Settings. logSettings.setActionCommand("LogSettings"); loadLogSettings(); // Create the Toolbar. toolBar = new JToolBar("Modeling Commands", JToolBar.HORIZONTAL); toolBar.setLayout(new FlowLayout(FlowLayout.LEFT)); jbLaunch = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/cog_go.png"))); jbLaunch.setActionCommand("Launch"); jbLaunch.setToolTipText("Launch the Force Field X Command"); jbLaunch.addActionListener(this); insets.set(2, 2, 2, 2); jbLaunch.setMargin(insets); toolBar.add(jbLaunch); jbStop = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/stop.png"))); jbStop.setActionCommand("End"); jbStop.setToolTipText("Terminate the Current Force Field X Command"); jbStop.addActionListener(this); jbStop.setMargin(insets); jbStop.setEnabled(false); toolBar.add(jbStop); toolBar.addSeparator(); toolBar.add(anyCommands); currentCommandBox = anyCommands; toolBar.addSeparator(); /* toolBar.add(logSettings); JButton jbdelete = new JButton(new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/page_delete.png"))); jbdelete.setActionCommand("Delete"); jbdelete.setToolTipText("Delete Log Files"); jbdelete.addActionListener(this); jbdelete.setMargin(insets); toolBar.add(jbdelete); toolBar.addSeparator(); */ ImageIcon icinfo = new ImageIcon(getClass().getClassLoader().getResource("ffx/ui/icons/information.png")); descriptCheckBox = new JCheckBoxMenuItem(icinfo); descriptCheckBox.addActionListener(this); descriptCheckBox.setActionCommand("Description"); descriptCheckBox.setToolTipText("Show/Hide Modeling Command Descriptions"); descriptCheckBox.setMargin(insets); toolBar.add(descriptCheckBox); toolBar.add(new JLabel("")); toolBar.setBorderPainted(false); toolBar.setFloatable(false); toolBar.setRollover(true); add(toolBar, BorderLayout.NORTH); // Load ModelingPanel preferences. Preferences prefs = Preferences.userNodeForPackage(ffx.ui.ModelingPanel.class); descriptCheckBox.setSelected(!prefs.getBoolean("JobPanel_description", true)); descriptCheckBox.doClick(); }
From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java
/** * Builds the component hosting the controls to add annotations. * /*w ww . j a v a 2 s . c o m*/ * @return See above. */ private JPanel buildAnnotationComponent() { JPanel p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); JLabel l = new JLabel(); l.setText("Add tag to images"); JPanel tagPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); tagPanel.add(l); tagPanel.add(tagButton); l = new JLabel(); l.setText(": "); tagPanel.add(l); tagPanel.add(tagsPane); p.add(tagPanel); return UIUtilities.buildComponentPanel(p); }
From source file:com.nikonhacker.gui.EmulatorUI.java
private JPanel createToolBar(int chip) { JPanel bar = new JPanel(); bar.setLayout(new ModifiedFlowLayout(FlowLayout.LEFT, 0, 0)); loadButton[chip] = makeButton("load", COMMAND_IMAGE_LOAD[chip], "Load " + Constants.CHIP_LABEL[chip] + " image", "Load"); bar.add(loadButton[chip]);/*from w ww. j av a2 s.c o m*/ bar.add(Box.createRigidArea(new Dimension(10, 0))); playButton[chip] = makeButton("play", COMMAND_EMULATOR_PLAY[chip], "Start or resume " + Constants.CHIP_LABEL[chip] + " emulator", "Play"); bar.add(playButton[chip]); debugButton[chip] = makeButton("debug", COMMAND_EMULATOR_DEBUG[chip], "Debug " + Constants.CHIP_LABEL[chip] + " emulator", "Debug"); bar.add(debugButton[chip]); pauseButton[chip] = makeButton("pause", COMMAND_EMULATOR_PAUSE[chip], "Pause " + Constants.CHIP_LABEL[chip] + " emulator", "Pause"); bar.add(pauseButton[chip]); stepButton[chip] = makeButton("step", COMMAND_EMULATOR_STEP[chip], "Step " + Constants.CHIP_LABEL[chip] + " emulator", "Step"); bar.add(stepButton[chip]); stopButton[chip] = makeButton("stop", COMMAND_EMULATOR_STOP[chip], "Stop " + Constants.CHIP_LABEL[chip] + " emulator and reset", "Stop"); bar.add(stopButton[chip]); bar.add(Box.createRigidArea(new Dimension(10, 0))); breakpointButton[chip] = makeButton("breakpoint", COMMAND_SETUP_BREAKPOINTS[chip], "Setup " + Constants.CHIP_LABEL[chip] + " breakpoints", "Breakpoints"); bar.add(breakpointButton[chip]); bar.add(Box.createRigidArea(new Dimension(10, 0))); bar.add(new JLabel("Sleep :")); bar.add(Box.createRigidArea(new Dimension(10, 0))); bar.add(makeSlider(chip)); bar.add(Box.createRigidArea(new Dimension(10, 0))); cpuStateButton[chip] = makeButton("cpu", COMMAND_TOGGLE_CPUSTATE_WINDOW[chip], Constants.CHIP_LABEL[chip] + " CPU state window", "CPU"); bar.add(cpuStateButton[chip]); memoryHexEditorButton[chip] = makeButton("memory_editor", COMMAND_TOGGLE_MEMORY_HEX_EDITOR[chip], Constants.CHIP_LABEL[chip] + " memory hex editor", "Hex Editor"); bar.add(memoryHexEditorButton[chip]); interruptControllerButton[chip] = makeButton("interrupt", COMMAND_TOGGLE_INTERRUPT_CONTROLLER_WINDOW[chip], Constants.CHIP_LABEL[chip] + " interrupt controller", "Interrupt"); bar.add(interruptControllerButton[chip]); programmableTimersButton[chip] = makeButton("timer", COMMAND_TOGGLE_PROGRAMMABLE_TIMERS_WINDOW[chip], Constants.CHIP_LABEL[chip] + " programmable timers", "Programmable timers"); bar.add(programmableTimersButton[chip]); serialInterfacesButton[chip] = makeButton("serial", COMMAND_TOGGLE_SERIAL_INTERFACES[chip], Constants.CHIP_LABEL[chip] + " serial interfaces", "Serial interfaces"); bar.add(serialInterfacesButton[chip]); ioPortsButton[chip] = makeButton("io", COMMAND_TOGGLE_IO_PORTS_WINDOW[chip], Constants.CHIP_LABEL[chip] + " I/O Ports", "I/O Ports"); bar.add(ioPortsButton[chip]); bar.add(Box.createRigidArea(new Dimension(10, 0))); if (chip == Constants.CHIP_FR) { screenEmulatorButton = makeButton("screen", COMMAND_TOGGLE_SCREEN_EMULATOR, "Screen emulator", "Screen"); bar.add(screenEmulatorButton); component4006Button = makeButton("4006", COMMAND_TOGGLE_COMPONENT_4006_WINDOW, "Component 4006", "Component 4006"); bar.add(component4006Button); } else { serialDevicesButton[Constants.CHIP_TX] = makeButton("serial_devices", COMMAND_TOGGLE_SERIAL_DEVICES[Constants.CHIP_TX], Constants.CHIP_LABEL[Constants.CHIP_TX] + " serial devices", "Serial devices"); bar.add(serialDevicesButton[Constants.CHIP_TX]); adConverterButton[Constants.CHIP_TX] = makeButton("ad_converter", COMMAND_TOGGLE_AD_CONVERTER[Constants.CHIP_TX], Constants.CHIP_LABEL[Constants.CHIP_TX] + " A/D converter", "A/D converter"); bar.add(adConverterButton[Constants.CHIP_TX]); frontPanelButton = makeButton("front_panel", COMMAND_TOGGLE_FRONT_PANEL, "Front Panel", "Front Panel"); bar.add(frontPanelButton); } bar.add(Box.createRigidArea(new Dimension(10, 0))); disassemblyButton[chip] = makeButton("disassembly_log", COMMAND_TOGGLE_DISASSEMBLY_WINDOW[chip], "Real time " + Constants.CHIP_LABEL[chip] + " disassembly log", "Disassembly"); bar.add(disassemblyButton[chip]); memoryActivityViewerButton[chip] = makeButton("memory_activity", COMMAND_TOGGLE_MEMORY_ACTIVITY_VIEWER[chip], Constants.CHIP_LABEL[chip] + " memory activity viewer", "Activity"); bar.add(memoryActivityViewerButton[chip]); customMemoryRangeLoggerButton[chip] = makeButton("custom_logger", COMMAND_TOGGLE_CUSTOM_LOGGER_WINDOW[chip], "Custom " + Constants.CHIP_LABEL[chip] + " logger", "Custom logger"); bar.add(customMemoryRangeLoggerButton[chip]); callStackButton[chip] = makeButton("call_stack", COMMAND_TOGGLE_CALL_STACK_WINDOW[chip], Constants.CHIP_LABEL[chip] + " call stack logger window", "CallStack"); bar.add(callStackButton[chip]); iTronObjectButton[chip] = makeButton("os", COMMAND_TOGGLE_ITRON_OBJECT_WINDOW[chip], Constants.CHIP_LABEL[chip] + " ITRON object window", "ITRON Object"); bar.add(iTronObjectButton[chip]); bar.add(Box.createRigidArea(new Dimension(10, 0))); analyseButton[chip] = makeButton("analyse", COMMAND_ANALYSE_DISASSEMBLE[chip], Constants.CHIP_LABEL[chip] + " Analyse/Disassemble", "Analyse"); bar.add(analyseButton[chip]); codeStructureButton[chip] = makeButton("code_structure", COMMAND_TOGGLE_CODE_STRUCTURE_WINDOW[chip], Constants.CHIP_LABEL[chip] + " Code Structure", "Structure"); bar.add(codeStructureButton[chip]); sourceCodeButton[chip] = makeButton("source", COMMAND_TOGGLE_SOURCE_CODE_WINDOW[chip], Constants.CHIP_LABEL[chip] + " Source code", "Source"); bar.add(sourceCodeButton[chip]); bar.add(Box.createHorizontalGlue()); saveLoadMemoryButton[chip] = makeButton("save_load_memory", COMMAND_SAVE_LOAD_MEMORY[chip], "Save/Load " + Constants.CHIP_LABEL[chip] + " memory area", "Save/Load memory"); bar.add(saveLoadMemoryButton[chip]); bar.add(Box.createRigidArea(new Dimension(10, 0))); chipOptionsButton[chip] = makeButton("options", COMMAND_CHIP_OPTIONS[chip], Constants.CHIP_LABEL[chip] + " options", "Options"); bar.add(chipOptionsButton[chip]); return bar; }
From source file:net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportConfigView.java
private void layoutPanel() { setPreferredSize(new Dimension(450, 400)); setLayout(new BorderLayout()); page1 = new JPanel(new GridBagLayout()); page2 = new JPanel(new GridBagLayout()); contentPanel = new JPanel(cardLayout); contentPanel.add(page1, "page1"); contentPanel.add(page2, "page2"); add(contentPanel, BorderLayout.CENTER); // title//w ww. j a v a 2 s . c o m titlePanel.setBorder(new CompoundBorder(titlePanel.getBorder(), new EmptyBorder(10, 10, 0, 10))); add(titlePanel, BorderLayout.NORTH); titlePanel.add(titleLabel, BorderLayout.NORTH); titlePanel.add(titleIcon, BorderLayout.WEST); titlePanel.add(titleMessage, BorderLayout.CENTER); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.WEST; c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1; c.gridx = 0; c.gridwidth = GridBagConstraints.REMAINDER; // column range c.insets = new Insets(10, 10, 0, 10); page1.add(columnLabel, c); c.insets = new Insets(10, 25, 0, 0); c.gridwidth = 1; c.weightx = 0; page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c); c.insets = new Insets(10, 0, 0, 0); c.gridx = 1; page1.add(columnFromValue, c); c.gridx = 2; page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c); c.gridx = 3; page1.add(columnToValue, c); c.gridx = 0; c.weightx = 1; c.insets = new Insets(10, 10, 0, 10); c.gridwidth = GridBagConstraints.REMAINDER; // row range page1.add(rowLabel, c); c.insets = new Insets(10, 25, 0, 0); c.gridwidth = 1; c.gridx = 0; c.weightx = 0; page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.from")), c); c.insets = new Insets(10, 0, 0, 0); c.gridx = 1; page1.add(rowFromValue, c); c.gridx = 2; page1.add(new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.to")), c); c.gridx = 3; page1.add(rowToValue, c); c.gridx = 4; page1.add(rowSelectAllOption, c); c.gridx = 5; c.gridwidth = GridBagConstraints.REMAINDER; c.insets = new Insets(10, 0, 0, 10); page1.add(rowExcludeFirstOption, c); c.insets = new Insets(10, 25, 0, 0); c.gridx = 0; page1.add(rowIgnoreBlankRows, c); c.gridx = 0; // empty cells c.insets = new Insets(10, 10, 10, 10); page1.add(emptyCellLabel, c); c.insets = new Insets(0, 25, 0, 10); page1.add(emptyCellEmptyStringOption, c); JPanel userDefinedPanel = new JPanel(new BorderLayout()); userDefinedPanel.add(emptyCellUserDefinedOption, BorderLayout.WEST); userDefinedPanel.add(emptyCellUserDefinedValue, BorderLayout.CENTER); page1.add(userDefinedPanel, c); c.weighty = 1; c.anchor = GridBagConstraints.NORTHWEST; page1.add(emptyCellErrorValueOption, c); // output format c.insets = new Insets(10, 10, 10, 10); c.weighty = 0; c.weightx = 1; page2.add(outputFormatLabel, c); c.insets = new Insets(0, 25, 0, 10); page2.add(outputFormatMultiplePort, c); page2.add(outputFormatSinglePort, c); c.insets = new Insets(0, 50, 0, 10); JPanel outputFormatDelimiterPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); outputFormatDelimiterPanel.add(outputFormatDelimiterLabel); outputFormatDelimiterPanel.add(outputFormatDelimiter); page2.add(outputFormatDelimiterPanel, c); // column mapping c.insets = new Insets(10, 10, 0, 10); page2.add(columnMappingLabel, c); c.insets = new Insets(10, 10, 10, 10); c.fill = GridBagConstraints.BOTH; c.weighty = 1; page2.add(new JScrollPane(columnMappingTable), c); buttonPanel.add(backButton); buttonPanel.add(nextButton); add(buttonPanel, BorderLayout.SOUTH); }