Package javax.swing

Examples of javax.swing.BoxLayout


        grid.setConstraints(blockedList, c);

        add(blockedList);

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(addButton);
        buttonPanel.add(removeButton);
        buttonPanel.add(Box.createHorizontalGlue());

        c.gridy++;
View Full Code Here


        main.add(fieldPanel);
        fieldPanel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2));
        field.setFont(okButton.getFont());

        JPanel buttons = new JPanel();
        buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));
        buttons.add(Box.createHorizontalGlue());
        buttons.add(okButton);
        buttons.add(Box.createHorizontalGlue());
        buttons.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 5));
View Full Code Here

    /**
     * Sets up the visual components
     */
    private void initComponents() {
        container.setLayout(new BoxLayout(container, BoxLayout.X_AXIS));

        tree = new PreferencesTree(this);
        container.add(tree);

        rightSide.setLayout(new BoxLayout(rightSide, BoxLayout.Y_AXIS));
        container.add(rightSide);

        // set the general preferences panel as the default selected panel
        prefsPanel.add(current);
        rightSide.add(prefsPanel);

        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.add(cancelButton);
        buttonPanel.add(applyButton);
        buttonPanel.add(okButton);

View Full Code Here

        super(BuddyList.getInstance().getContainerFrame(), "Add/Modify Buddy", false);
        setTitle(resources.getString("addBuddyDialogTitle"));

        this.initComponents();
        container.setBorder(BorderFactory.createEmptyBorder(5, 25, 5, 25));
        container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));

        JLabel newBuddyLabel = new JLabel(resources.getString("addBuddyDialogTitle"));
        newBuddyLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
        newBuddyLabel.setAlignmentX(Container.CENTER_ALIGNMENT);
        container.add(newBuddyLabel);

        JPanel newBuddyPanel = new JPanel();
        newBuddyPanel.setLayout(grid);

        createInputBox(newBuddyPanel, grid, resources.getString("buddyId")
                 + ":", buddyIDBox);
        createInputBox(newBuddyPanel, grid, resources.getString("alias") + ":",
                buddyAliasBox);
        createInputBox(newBuddyPanel, grid, resources.getString("buddyGroup")
                 + ":", buddyGroups);
        createInputBox(newBuddyPanel, grid, resources.getString("newGroup")
                 + ":", newGroupBox);

        container.add(newBuddyPanel);

        //add the buttons
        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
        buttonPanel.add(okButton);
        buttonPanel.add(cancelButton);

        container.add(buttonPanel);
View Full Code Here

        p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

        container.add(p, BorderLayout.CENTER);
        pane.setBorder(BorderFactory.createEtchedBorder());

        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

        buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        buttonPanel.add(Box.createHorizontalGlue());

        if (type != TYPE_OUTCASTS)
View Full Code Here

    public PreferencesTree(PreferencesDialog prefsDialog) {
        this.prefsDialog = prefsDialog;

        setupTree();

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        add(scroll);
        setPreferredSize(new Dimension(150, 350));
    }
View Full Code Here

        mainPanel.setLayout(new BorderLayout());
        mainPanel.add(pane, BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.add(retrieve);
        if (personal)
            buttonPanel.add(save);
        buttonPanel.add(okButton);
View Full Code Here

     *            the buddy's alias
     */
    public HeadlinesPanel(BuddyStatus buddy) {
        super(buddy);

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        conversationArea.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
        add(conversationArea);
        addListeners();
    }
View Full Code Here

        DialogTracker.addDialog(this, true, true);
        setContentPane(container);
        container.setBorder(BorderFactory.createEmptyBorder(10, 35, 10, 35));

        container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));
        JLabel setPriorityLabel = new JLabel(resources.getString("setPriority"));
        setPriorityLabel
                .setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 0));
        setPriorityLabel.setAlignmentX(Container.CENTER_ALIGNMENT);

        container.add(setPriorityLabel);

        JPanel labelPanel = new JPanel();
        labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
        labelPanel.add(label);
        labelPanel.add(priorityBox);
        container.add(labelPanel);

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
        buttonPanel.add(okButton);
        buttonPanel.add(cancelButton);

        container.add(buttonPanel);
View Full Code Here

        main = (JPanel) getContentPane();

        JPanel listPanel = new JPanel();
        JPanel buttonPanel = new JPanel();
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 5));
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.add(okButton);
        buttonPanel.add(cancelButton);
        listPanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 2, 5));
        listPanel.setLayout(new BoxLayout(listPanel, BoxLayout.Y_AXIS));
        listPanel.add(Box.createHorizontalGlue());
        listPanel.add(listPane);
        listPanel.add(buttonPanel);
        main.add(listPanel);
        addListeners();
View Full Code Here

TOP

Related Classes of javax.swing.BoxLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.