Package javax.swing

Examples of javax.swing.BoxLayout


                + form.getInstructions().replaceAll("\\n", "<br>") + "</html>");
        instructions.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        main.add(instructions, BorderLayout.NORTH);

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


        mainPanel.setBorder(BorderFactory.createTitledBorder(resources
                .getString("changePassword")));
        mainPanel.setLayout(new BorderLayout());

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

        topPanel.setLayout(new BorderLayout(5, 5));
        topPanel.add(hostLabel, BorderLayout.WEST);
        topPanel.add(serverField, BorderLayout.CENTER);

        JPanel navPanel = new JPanel();
        navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS));
        forward.setPreferredSize(new Dimension(26, 26));
        back.setPreferredSize(new Dimension(26, 26));
        navPanel.add(back);
        navPanel.add(forward);

        topPanel.add(navPanel, BorderLayout.EAST);

        middlePanel.add(topPanel, BorderLayout.NORTH);

        middlePanel.add(scrollPane, BorderLayout.CENTER);

        panel.add(title, BorderLayout.NORTH);
        table.setBorder(BorderFactory.createEtchedBorder());
        panel.add(middlePanel, BorderLayout.CENTER);

        bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.X_AXIS));
        bottomPanel.add(status);

        bottomPanel.add(Box.createHorizontalGlue());
        bottomPanel.add(searchButton);
        bottomPanel.add(closeButton);
View Full Code Here

     *@param  buddy      the buddy to associate with
     */
    public ChatPanel(final BuddyStatus buddy) {
        super(buddy);

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

        // create two fields, one for where you type your message to be sent,
        // and the other where you see the conversation that has already happened.
        textEntryArea.setLineWrap(true);
        textEntryArea.setWrapStyleWord(true);

        conversationArea.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

        container = new JSplitPane(JSplitPane.VERTICAL_SPLIT, conversationArea,
                scroll);
        container.setResizeWeight(1);

        JPanel containerPanel = new JPanel();
        containerPanel.setLayout(new BoxLayout(containerPanel, BoxLayout.X_AXIS));
        containerPanel.add(container);

        JPanel bottomPanel = new JPanel();
        bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.Y_AXIS));

        if (buddy.getUser().indexOf("/") >= 0) {
            resourceBox.setEnabled(false);
        }

        resourceBox.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    selected = (String) resourceBox.getSelectedItem();
                }
            });

        resourceBox.setRenderer(new PresenceComboBoxRenderer());
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));

        JPanel resourcePanel = new JPanel();
        resourcePanel.setLayout(new BoxLayout(resourcePanel, BoxLayout.Y_AXIS));
        resourcePanel.add(Box.createVerticalGlue());
        resourcePanel.add(resourceBox);

        buttonPanel.add(resourcePanel);
        typingLabel.setPreferredSize(new Dimension(26, 26));
View Full Code Here

        container.setLayout(new BorderLayout());
        container.setBorder(BorderFactory.createEmptyBorder(0, 15, 15, 15));
        mainPanel.setBorder(BorderFactory.createTitledBorder(resources
                .getString("aboutDialogTitle")));

        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        buttonPanel.add(okButton);
        buttonPanel.add(creditsButton);
        buttonPanel.add(Box.createHorizontalGlue());
View Full Code Here

        videoComponent = new VideoComponent();
        mediaPlayer.setVideoSink(videoComponent.getElement());
        setLayout(new BorderLayout());
        add(videoComponent, BorderLayout.CENTER);
        controls = new JPanel();
        controls.setLayout(new BoxLayout(controls, BoxLayout.X_AXIS));
        add(controls, BorderLayout.SOUTH);
       
        controls.add(new PopupVolumeButton(volumeModel));
        controls.add(new JButton(rewAction));
        controls.add(new JButton(togglePlayAction));
View Full Code Here

    public PopupVolumeButton(BoundedRangeModel model) {
        /*
         * Construct the popup for the volume slider
         */
        volumePanel = new JPanel();
        volumePanel.setLayout(new BoxLayout(volumePanel, BoxLayout.Y_AXIS));
       
        volumeSlider = new JSlider(model);
        volumeSlider.addChangeListener(volumeChanged);
        volumeSlider.setOrientation(SwingConstants.VERTICAL);
        volumePanel.add(new JLabel(highVolumeIcon));
View Full Code Here

                SwingConstants.CENTER);
        messageLabel.setBorder(BorderFactory.createEmptyBorder(5, 15, 5, 15));
        mainPanel.add(messageLabel, BorderLayout.CENTER);
        mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        JPanel bottomPanel = new JPanel();
        bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.X_AXIS));
        bottomPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        bottomPanel.add(Box.createHorizontalGlue());
        bottomPanel.add(buttonPanel);
        bottomPanel.add(Box.createHorizontalGlue());

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

        mainPanel.add(bottomPanel, BorderLayout.SOUTH);
        JLabel iconLabel = new JLabel(getIconFromNum(icon));
        iconLabel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 5));
        mainPanel.add(iconLabel, BorderLayout.WEST);
View Full Code Here

        if (managePanel)
            model.setManageModel();
        table = new JTable(model);
        model.setTable(table);

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

        JScrollPane scrollPane = new JScrollPane(table);
        scrollPane.getViewport().setBackground(Color.WHITE);

        add(scrollPane);
        add(Box.createRigidArea(new Dimension(0, 5)));

        JScrollPane pane = new JScrollPane(descArea);
        add(pane);

        Dimension dim = descArea.getSize();
        dim.setSize((int) dim.getWidth(), 130);
        descArea.setPreferredSize(dim);

        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
        buttonPanel.add(Box.createHorizontalGlue());
        buttonPanel.add(pluginButton);
        buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));

        add(buttonPanel);
View Full Code Here

            cancel.setEnabled(false);

        panel.add(bar, BorderLayout.NORTH);

        JPanel buttons = new JPanel();
        buttons.setLayout(new BoxLayout(buttons, BoxLayout.X_AXIS));
        buttons.add(Box.createHorizontalGlue());
        buttons.add(cancel);
        buttons.add(Box.createHorizontalGlue());
        panel.add(buttons, BorderLayout.SOUTH);
        cancel.addActionListener(new ActionListener() {
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.