Java 8 GridBagConstraints - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 GridBagConstraints class.

This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:clone
		setLayout(new GridBagLayout());
		setBorder(makeBorder()); 
 
		// Create constraints for 4 vertical component, give weight 
		// to Url Config 
	    GridBagConstraints c1 = new GridBagConstraints();
	    c1.gridx = 0;
	    c1.gridy = 0;
	    c1.fill = GridBagConstraints.HORIZONTAL;
	    c1.anchor = GridBagConstraints.CENTER;
	    c1.weightx = 1.0;
	    c1.weighty = 0.0;
	    c1.insets = new Insets(1, 1, 1, 1);
	    c1.gridwidth = GridBagConstraints.REMAINDER;
	    c1.gridheight = 1;
 
	    GridBagConstraints c2 = (GridBagConstraints)c1.clone();
	    c2.gridy = 1;
	     
	    GridBagConstraints c3 = (GridBagConstraints)c1.clone();

6
CodeRank
This code example shows how to use the following methods:
     
    // Implementation methods 
    //-------------------------------------------------------------------------                     
     
    protected GridBagConstraints createConstraints() {
        GridBagConstraints answer = new GridBagConstraints();
        answer.anchor = getAnchor();
        if (colspan < 1) {
            colspan = 1;
        } 
        if (rowspan < 1) {
            rowspan = 1;
        } 
        if (isColfill())  { 
            answer.fill = isRowfill()
                ? GridBagConstraints.BOTH 
                : GridBagConstraints.HORIZONTAL;
        } 
        else { 
            answer.fill = isRowfill()
7
CodeRank
This code example shows how to use the following methods:
6
CodeRank
This code example shows how to use the following methods:
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                start(); 
            } 
        }); 
        c = new GridBagConstraints();
        c.gridy = 1;
        c.anchor = GridBagConstraints.EAST;
        c.insets = new Insets(5, 5, 5, 5);
        panel.add(startButton, c);
    } 
     
    private void start() { 
        workingMemory.startProcess(processIdTextField.getText());
        workingMemory.fireAllRules();
    } 
     
} 
6
CodeRank
This code example shows how to use the following methods:
        this.autoCompletionComboBox.setRecentURLsModel(recentURLsModel);
    } 
 
    public void actionPerformed(final ActionEvent e) {
        final JPanel panel = new JPanel(new GridBagLayout());
        final GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.anchor = GridBagConstraints.WEST;
        panel.add(autoCompletionComboBox, gridBagConstraints);
        gridBagConstraints.gridy = 1;
 
        final JCheckBox addURLCheckBox = new JCheckBox(LocalisationHelper.getString("urlopen_dialog_add_checkbox"), false);
        final boolean aDocumentIsAlreadyOpen = gcViewer.getSelectedGCDocument() != null;
        addURLCheckBox.setVisible(aDocumentIsAlreadyOpen);
        addURLCheckBox.setEnabled(aDocumentIsAlreadyOpen);
        addURLCheckBox.setToolTipText(LocalisationHelper.getString("urlopen_dialog_hint_add_checkbox"));
        panel.add(addURLCheckBox, gridBagConstraints);
        final int result = JOptionPane.showConfirmDialog(gcViewer, panel, LocalisationHelper.getString("urlopen_dialog_title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
        if (JOptionPane.OK_OPTION == result) {
            try { 
                final URL[] urls = new URL[]{new URL((String)autoCompletionComboBox.getSelectedItem())};
7
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
This code example shows how to use the following methods:
    private JCheckBox cbReadPrefs;
    private JCheckBox cbModifyNotes;
 
    protected final void build() { 
        setLayout(new GridBagLayout());
        GridBagConstraints gc = new GridBagConstraints();
        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
 
        // checkbox for "allow to upload map data" 
        // 
        gc.anchor = GridBagConstraints.NORTHWEST;
        gc.fill = GridBagConstraints.HORIZONTAL;
        gc.weightx = 1.0;
        gc.insets = new Insets(0,0,3,3);
        add(cbWriteApi = new JCheckBox(), gc);
        cbWriteApi.setText(tr("Allow to upload map data"));
        cbWriteApi.setToolTipText(tr("Select to grant JOSM the right to upload map data on your behalf"));
        cbWriteApi.setSelected(true);
 
        // checkbox for "allow to upload gps traces" 

6
CodeRank
See Code Examples for Java 8 GridBagConstraints Methods: