Java Code Examples for javax.swing.GroupLayout#setVerticalGroup()
The following examples show how to use
javax.swing.GroupLayout#setVerticalGroup() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScrDeclensionGenSetup.java From PolyGlot with MIT License | 6 votes |
private void setMainPanel(PDialog dialog) { curDialog = dialog; Component display = curDialog.getWindow(); jPanel2.removeAll(); this.repaint(); // set new screen GroupLayout layout = new GroupLayout(jPanel2); jPanel2.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(display, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(display, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }
Example 2
Source File: DefaultEmptyPayloadGeneratorUIHandler.java From zap-extensions with Apache License 2.0 | 6 votes |
public DefaultEmptyPayloadGeneratorUIPanel() { fieldsPanel = new JPanel(); GroupLayout layout = new GroupLayout(fieldsPanel); fieldsPanel.setLayout(layout); layout.setAutoCreateGaps(true); JLabel valueLabel = new JLabel(NUMBER_REPETITIONS_FIELD_LABEL); valueLabel.setLabelFor(getRepetitionsNumberSpinner()); layout.setHorizontalGroup( layout.createSequentialGroup() .addComponent(valueLabel) .addComponent(getRepetitionsNumberSpinner())); layout.setVerticalGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(valueLabel) .addComponent(getRepetitionsNumberSpinner())); }
Example 3
Source File: CustomizerOptionsPanel.java From netbeans with Apache License 2.0 | 6 votes |
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { innerPanel = new JPanel(); innerPanel.setLayout(new BorderLayout()); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }
Example 4
Source File: StockpileDialog.java From jeveassets with GNU General Public License v2.0 | 6 votes |
private void updatePanels() { jFiltersPanel.removeAll(); GroupLayout groupLayout = new GroupLayout(jFiltersPanel); jFiltersPanel.setLayout(groupLayout); groupLayout.setAutoCreateGaps(true); groupLayout.setAutoCreateContainerGaps(false); ParallelGroup horizontalGroup = groupLayout.createParallelGroup(); SequentialGroup verticalGroup = groupLayout.createSequentialGroup(); for (LocationPanel locationPanel : locationPanels) { horizontalGroup.addComponent(locationPanel.getPanel()); verticalGroup.addComponent(locationPanel.getPanel()); } jFiltersPanel.setVisible(!locationPanels.isEmpty()); groupLayout.setHorizontalGroup(horizontalGroup); groupLayout.setVerticalGroup(verticalGroup); autoValidate(); this.getDialog().pack(); }
Example 5
Source File: ProcessorsPayloadDialog.java From zap-extensions with Apache License 2.0 | 6 votes |
@Override protected JPanel getFieldsPanel() { JPanel fieldsPanel = new JPanel(); GroupLayout layout = new GroupLayout(fieldsPanel); fieldsPanel.setLayout(layout); layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); JLabel processorsLabel = new JLabel( Constant.messages.getString( "fuzz.fuzzer.dialog.payloads.dialog.processors.processors.label")); layout.setHorizontalGroup( layout.createParallelGroup() .addComponent(processorsLabel) .addComponent(processorsTablePanel)); layout.setVerticalGroup( layout.createSequentialGroup() .addComponent(processorsLabel) .addComponent(processorsTablePanel)); return fieldsPanel; }
Example 6
Source File: FrameworksPanel.java From netbeans with Apache License 2.0 | 5 votes |
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { scrollCategories = new JScrollPane(); listCategories = new JList<String>(); panelContent = new JPanel(); listCategories.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scrollCategories.setViewportView(listCategories); panelContent.setLayout(new BorderLayout()); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(scrollCategories, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(panelContent, GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE) .addGap(0, 0, 0)) ); layout.setVerticalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(0, 0, 0) .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(scrollCategories, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) .addComponent(panelContent, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) ); }
Example 7
Source File: PayloadsDialog.java From zap-extensions with Apache License 2.0 | 5 votes |
@Override protected JPanel getFieldsPanel() { JPanel fieldsPanel = new JPanel(); GroupLayout layout = new GroupLayout(fieldsPanel); fieldsPanel.setLayout(layout); layout.setAutoCreateGaps(true); layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(payloadsPanel)); layout.setVerticalGroup(layout.createSequentialGroup().addComponent(payloadsPanel)); return fieldsPanel; }
Example 8
Source File: AddEncodeDecodeTabDialog.java From zap-extensions with Apache License 2.0 | 5 votes |
@Override protected JPanel getFieldsPanel() { JPanel fieldsPanel = new JPanel(); GroupLayout layout = new GroupLayout(fieldsPanel); fieldsPanel.setLayout(layout); layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); JLabel nameLabel = new JLabel(NAME_FIELD_LABEL); layout.setHorizontalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(nameLabel)) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(getNameTextField()))); layout.setVerticalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(nameLabel) .addComponent(getNameTextField()))); return fieldsPanel; }
Example 9
Source File: JColorTable.java From jeveassets with GNU General Public License v2.0 | 5 votes |
public MyComboBox() { jPanel = new JPanel(); GroupLayout layout = new GroupLayout(jPanel); jPanel.setLayout(layout); layout.setAutoCreateGaps(false); layout.setAutoCreateContainerGaps(false); jDefault = new JNullableLabel(); jDefault.setHorizontalAlignment(JLabel.CENTER); jDefault.setVerticalAlignment(JLabel.CENTER); jDefault.setOpaque(true); jPickerIcon = new JLabel(Images.SETTINGS_COLOR_PICKER.getIcon()); jPickerIcon.setHorizontalTextPosition(JLabel.CENTER); jPickerIcon.setHorizontalAlignment(JLabel.CENTER); jPickerIcon.setVerticalAlignment(JLabel.CENTER); jPickerIcon.setOpaque(true); layout.setHorizontalGroup( layout.createSequentialGroup() .addComponent(jDefault, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Integer.MAX_VALUE) .addComponent(jPickerIcon, 16, 16, 16) ); layout.setVerticalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jDefault, 0, 0, Integer.MAX_VALUE) .addComponent(jPickerIcon, 0, 0, Integer.MAX_VALUE) ); }
Example 10
Source File: CommentsPanel.java From netbeans with Apache License 2.0 | 5 votes |
private JPanel createTextPanelPlaceholder() { JPanel placeholder = new JPanel(); placeholder.setBackground(blueBackground); GroupLayout layout = new GroupLayout(placeholder); placeholder.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, ICON_WIDTH, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); return placeholder; }
Example 11
Source File: HttpFuzzerHandlerOptionsPanel.java From zap-extensions with Apache License 2.0 | 5 votes |
public HttpFuzzerHandlerOptionsPanel() { optionsPanel = new JPanel(); followRedirectsCheckBox = new JCheckBox(); JLabel followRedirectsLabel = new JLabel( Constant.messages.getString( "fuzz.httpfuzzer.options.label.followredirects")); followRedirectsLabel.setLabelFor(followRedirectsCheckBox); showRedirectMessagesCheckBox = new JCheckBox(); JLabel showRedirectMessagesLabel = new JLabel( Constant.messages.getString("fuzz.httpfuzzer.options.label.showredirects")); showRedirectMessagesLabel.setLabelFor(showRedirectMessagesCheckBox); GroupLayout layout = new GroupLayout(optionsPanel); optionsPanel.setLayout(layout); layout.setAutoCreateGaps(true); layout.setHorizontalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(followRedirectsLabel)) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(followRedirectsCheckBox))); layout.setVerticalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(followRedirectsLabel) .addComponent(followRedirectsCheckBox))); }
Example 12
Source File: PayloadPreviewPanel.java From zap-extensions with Apache License 2.0 | 5 votes |
public PayloadPreviewPanel(ResettableAutoCloseableIterator<Payload> payloads) { this.payloads = payloads; JLabel currentPayloadsLabel = new JLabel(CURRENT_PAYLOADS_FIELD_LABEL); currentPayloadsLabel.setLabelFor(getCurrentPayloadsTextArea()); JLabel processedPayloadsLabel = new JLabel(PROCESSED_PAYLOADS_FIELD_LABEL); processedPayloadsLabel.setLabelFor(getProcessedPayloadsTextArea()); JScrollPane currentPayloadsScrollPane = new JScrollPane(getCurrentPayloadsTextArea()); JScrollPane processedPayloadsScrollPane = new JScrollPane(getProcessedPayloadsTextArea()); SyncScrollBarsAdjustmentListener syncScrollPanes = new SyncScrollBarsAdjustmentListener( currentPayloadsScrollPane, processedPayloadsScrollPane); JPanel panel = createSplitPanel( createLabelledPanel(currentPayloadsLabel, currentPayloadsScrollPane), createLabelledPanel(processedPayloadsLabel, processedPayloadsScrollPane), syncScrollPanes); mainPanel = new JPanel(); GroupLayout layout = new GroupLayout(mainPanel); mainPanel.setLayout(layout); layout.setAutoCreateGaps(true); layout.setHorizontalGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(getPayloadsPreviewGenerateButton()) .addComponent(panel)); layout.setVerticalGroup( layout.createSequentialGroup() .addComponent(getPayloadsPreviewGenerateButton()) .addComponent(panel)); updatePayloadsTextArea( getCurrentPayloadsTextArea(), NullPayloadProcessor.getNullPayloadProcessor()); }
Example 13
Source File: FailedFilesPanel.java From netbeans with Apache License 2.0 | 5 votes |
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { titleLabel = new JLabel(); failedFilesScrollPane = new JScrollPane(); failedFilesList = new JList<String>(); Mnemonics.setLocalizedText(titleLabel, "TITLE"); // NOI18N failedFilesList.setEnabled(false); failedFilesScrollPane.setViewportView(failedFilesList); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(failedFilesScrollPane) .addGroup(layout.createSequentialGroup() .addComponent(titleLabel) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(titleLabel) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(failedFilesScrollPane) .addContainerGap()) ); }
Example 14
Source File: TokenOptionsPanel.java From zap-extensions with Apache License 2.0 | 4 votes |
public TokenOptionsPanel() { super(); JLabel threadsPerScanLabel = new JLabel(THREADS_PER_SCAN_LABEL); threadsPerScanNumberSpinner = new ZapNumberSpinner(1, TokenParam.DEFAULT_THREADS_PER_SCAN, 50); JLabel requestDelayLabel = new JLabel(REQUEST_DELAY_LABEL); requestDelayNumberSpinner = new ZapNumberSpinner(0, TokenParam.DEFAULT_REQUEST_DELAY_IN_MS, Integer.MAX_VALUE); setName(NAME); GroupLayout layout = new GroupLayout(this); setLayout(layout); layout.setAutoCreateGaps(true); layout.setAutoCreateContainerGaps(true); layout.setHorizontalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(threadsPerScanLabel) .addComponent(requestDelayLabel)) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(threadsPerScanNumberSpinner) .addComponent(requestDelayNumberSpinner))); layout.setVerticalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(threadsPerScanLabel) .addComponent(threadsPerScanNumberSpinner)) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(requestDelayLabel) .addComponent(requestDelayNumberSpinner))); }
Example 15
Source File: BrowseFolderPanel.java From netbeans with Apache License 2.0 | 4 votes |
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { targetFolderLabel = new JLabel(); targetFolderTextField = new JTextField(); browseTargetFolderButton = new JButton(); targetFolderLabel.setLabelFor(targetFolderTextField); Mnemonics.setLocalizedText(targetFolderLabel, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text")); Mnemonics.setLocalizedText(browseTargetFolderButton, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text")); browseTargetFolderButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { browseTargetFolderButtonActionPerformed(evt); } }); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(targetFolderLabel) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(browseTargetFolderButton) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(targetFolderLabel) .addComponent(targetFolderTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(browseTargetFolderButton))) ); }
Example 16
Source File: BotServiceSecurityConfigDefaultsGui.java From BotServiceStressToolkit with MIT License | 4 votes |
private void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); JPanel northPanel = new JPanel(); northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH)); northPanel.add(makeTitlePanel()); add(northPanel, BorderLayout.NORTH); JPanel mainPanel = new JPanel(); clientSecretLabel = new javax.swing.JLabel(); appIdLabel = new javax.swing.JLabel(); appIdTextField = new javax.swing.JTextField(); clientSecretTextField = new javax.swing.JPasswordField(); clientSecretLabel.setText(CLIENT_SECRET_LABEL); appIdLabel.setText(APP_ID_LABEL); GroupLayout layout = new GroupLayout(mainPanel); mainPanel.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addComponent(appIdLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(appIdTextField)) .addGroup(layout.createSequentialGroup().addComponent(clientSecretLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clientSecretTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 526, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 107, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(appIdLabel).addComponent(appIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clientSecretLabel).addComponent(clientSecretTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(203, Short.MAX_VALUE))); add(mainPanel, BorderLayout.CENTER); }
Example 17
Source File: CEDefinitionPanel.java From open-ig with GNU Lesser General Public License v3.0 | 4 votes |
/** * @return the properties listing panel */ JPanel createPropertiesPanel() { JPanel p = new JPanel(); GroupLayout gl = new GroupLayout(p); p.setLayout(gl); gl.setAutoCreateContainerGaps(true); gl.setAutoCreateGaps(true); SequentialGroup rows = gl.createSequentialGroup(); ParallelGroup col1 = gl.createParallelGroup(); ParallelGroup col2 = gl.createParallelGroup(); ParallelGroup col3 = gl.createParallelGroup(); for (String a : PARAM_NAMES) { JLabel indicator = new JLabel(); JLabel caption = new JLabel(get("definition.refprop_" + a)); JTextField textField = new JTextField(10); textField.setHorizontalAlignment(JTextField.RIGHT); caption.setToolTipText(get("definition.refprop_" + a + ".tip")); textField.setToolTipText(get("definition.refprop_" + a + ".tip")); indicators.put(a, indicator); fields.put(a, textField); ParallelGroup pg = gl.createParallelGroup(Alignment.BASELINE); col1.addComponent(caption); col2.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); col3.addComponent(indicator, 20, 20, 20); pg.addComponent(caption); pg.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); pg.addComponent(indicator, 20, 20, 20); rows.addGroup(pg); } gl.setHorizontalGroup( gl.createSequentialGroup() .addGroup(col1) .addGroup(col2) .addGroup(col3) ); gl.setVerticalGroup(rows); return p; }
Example 18
Source File: ScriptStringPayloadGeneratorAdapterUIHandler.java From zap-extensions with Apache License 2.0 | 4 votes |
public ScriptStringPayloadGeneratorAdapterUIPanel(List<ScriptWrapper> scriptWrappers) { scriptComboBox = new JComboBox<>(new SortedComboBoxModel<ScriptUIEntry>()); for (ScriptWrapper scriptWrapper : scriptWrappers) { if (scriptWrapper.isEnabled()) { scriptComboBox.addItem(new PayloadGeneratorScriptUIEntry(scriptWrapper)); } } scriptComboBox.addItemListener( new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { updatePreviewFor((PayloadGeneratorScriptUIEntry) e.getItem()); } } }); setPreviewAndSaveButtonsEnabled(scriptComboBox.getSelectedIndex() >= 0); fieldsPanel = new JPanel(); GroupLayout layout = new GroupLayout(fieldsPanel); fieldsPanel.setLayout(layout); layout.setAutoCreateGaps(true); JLabel scriptLabel = new JLabel(SCRIPT_FIELD_LABEL); scriptLabel.setLabelFor(scriptComboBox); JLabel payloadsPreviewLabel = new JLabel(PAYLOADS_PREVIEW_FIELD_LABEL); payloadsPreviewLabel.setLabelFor(getPayloadsPreviewTextArea()); JScrollPane payloadsPreviewScrollPane = new JScrollPane(getPayloadsPreviewTextArea()); layout.setHorizontalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(scriptLabel) .addComponent(payloadsPreviewLabel)) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(scriptComboBox) .addGroup( layout.createSequentialGroup() .addComponent( getPayloadsPreviewGenerateButton()) .addComponent(getSaveButton())) .addComponent(payloadsPreviewScrollPane))); layout.setVerticalGroup( layout.createSequentialGroup() .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(scriptLabel) .addComponent(scriptComboBox)) .addGroup( layout.createParallelGroup() .addComponent(getPayloadsPreviewGenerateButton()) .addComponent(getSaveButton())) .addGroup( layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(payloadsPreviewLabel) .addComponent(payloadsPreviewScrollPane))); }
Example 19
Source File: BrowseFolderPanel.java From netbeans with Apache License 2.0 | 4 votes |
/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { targetFolderLabel = new JLabel(); targetFolderTextField = new JTextField(); browseTargetFolderButton = new JButton(); targetFolderLabel.setLabelFor(targetFolderTextField); Mnemonics.setLocalizedText(targetFolderLabel, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text")); // NOI18N Mnemonics.setLocalizedText(browseTargetFolderButton, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text")); // NOI18N browseTargetFolderButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { browseTargetFolderButtonActionPerformed(evt); } }); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(targetFolderLabel) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(browseTargetFolderButton) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(targetFolderLabel) .addComponent(targetFolderTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(browseTargetFolderButton))) ); }
Example 20
Source File: PropertyPanel.java From netbeans with Apache License 2.0 | 4 votes |
private void initComponents() { JLabel keyLabel = new JLabel(); JLabel valueLabel = new JLabel(); JLabel commentLabel = new JLabel(); keyText = new JTextField(25); valueText = new JTextField(25); commentText = new JTextField(25); keyLabel.setLabelFor(keyText); valueLabel.setLabelFor(valueText); commentLabel.setLabelFor(commentText); Mnemonics.setLocalizedText(keyLabel, NbBundle.getMessage(getClass(), "LBL_KeyLabel")); // NOI18N Mnemonics.setLocalizedText(valueLabel, NbBundle.getMessage(getClass(), "LBL_ValueLabel")); // NOI18N Mnemonics.setLocalizedText(commentLabel, NbBundle.getMessage(getClass(), "LBL_CommentLabel")); // NOI18N GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(LEADING) .addComponent(keyLabel) .addComponent(valueLabel) .addComponent(commentLabel)) .addPreferredGap(RELATED) .addGroup(layout.createParallelGroup(LEADING) .addComponent(keyText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(valueText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(commentText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE)) .addContainerGap() ); layout.setVerticalGroup( layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(BASELINE) .addComponent(keyLabel) .addComponent(keyText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE)) .addPreferredGap(RELATED) .addGroup(layout.createParallelGroup(BASELINE) .addComponent(valueText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE) .addComponent(valueLabel)) .addPreferredGap(RELATED) .addGroup(layout.createParallelGroup(BASELINE) .addComponent(commentText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE) .addComponent(commentLabel)) .addContainerGap() ); }