Package javax.swing.border

Examples of javax.swing.border.EmptyBorder


        initialiseComponents();
    }

    private void initialiseComponents() {
        setLayout(new BorderLayout());
        setBorder(new EmptyBorder(4, 4, 4, 4));

        treeScrollPane.setViewportView(demoTree);

        add(treeScrollPane, BorderLayout.CENTER);
    }
View Full Code Here


        tabControlButtonGroup.add(tabRightRadioButton);
        tabControlButtonGroup.add(tabTopRadioButton);
        tabControlButtonGroup.add(tabBottomRadioButton);

        int y = -1;
        tabControlPanel.setBorder(new EmptyBorder(4, 4, 4, 4));
        tabControlPanel.add(tabControlLabel,
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 0.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));
        tabControlPanel.add(tabTopRadioButton,
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 0.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));
        tabControlPanel.add(tabLeftRadioButton,
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 0.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));
        tabControlPanel.add(tabBottomRadioButton,
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 0.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));
        tabControlPanel.add(tabRightRadioButton,
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 0.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));
        tabControlPanel.add(Box.createVerticalGlue(),
                new GridBagConstraints(0, ++y, 1, 1, 1.0, 1.0,
                        GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(2, 4, 2, 4),
                        0, 0));

        tabbedPane.addTab("JList/JSplitPane", listSplitPanePanel);
        tabbedPane.addTab("JButton", buttonPanel);
        buttonPanel.setDefaultButton(getRootPane());
        tabbedPane.addTab("JToggleButton", toggleButtonPanel);
        tabbedPane.addTab("JCheckBox", checkBoxPanel);
        tabbedPane.addTab("JRadioButton", radioButtonPanel);
        tabbedPane.addTab("JProgressBar", progressBarPanel);
        tabbedPane.addTab("JSlider", sliderPanel);
        tabbedPane.addTab("JTextField", textFieldPanel);
        tabbedPane.addTab("JSpinner", spinnerPanel);
        tabbedPane.addTab("JComboBox", comboBoxPanel);
        tabbedPane.addTab("JTree", treePanel);
        tabbedPane.addTab("JOptionPane", optionPanePanel);
        tabbedPane.addTab("JFileChooser", fileChooserPanel);
        tabbedPane.addTab("JColorChooser", colorChooserPanel);

        tabbedPane.setBorder(new EmptyBorder(4, 4, 4, 4));
        getContentPane().add(tabbedPane, BorderLayout.CENTER);
        getContentPane().add(tabControlPanel, BorderLayout.EAST);

        pack();
    }
View Full Code Here

         gbc.gridx = 0;
         gbc.gridy = 7;
         pnl.add(_showPleaseWaitDialog, gbc);

         _localeChooser.setBorder(new EmptyBorder(5, 20, 5, 30));
         JPanel localePanel = new JPanel();
         BoxLayout layout = new BoxLayout(localePanel, BoxLayout.X_AXIS);
         localePanel.setLayout(layout);
         localePanel.add(_localeChooserLabel);
         localePanel.add(_localeChooser);
View Full Code Here

    public AbstractGainButtonPanel(Skin skin) {
  GridLayout grid;
  setLayout(grid = new GridLayout(2, 1));
        grid.setVgap(0);
        grid.setHgap(0);
  setBorder(new EmptyBorder(0, 0, 0, 0));
  add(gainIncreaseButton = createGainIncreaseButton(skin));
  add(gainDecreaseButton = createGainDecreaseButton(skin));
    }
View Full Code Here

    private void setUpControlComponent() {
        JLabel timeLabel = new JLabel("Media Time:", JLabel.RIGHT);
        JPanel mainPanel = new JPanel();
        int GAP = 10;

        Border emptyBorder  = new EmptyBorder(GAP,GAP,GAP,GAP);

        Border etchedBorder = new CompoundBorder(
            new EtchedBorder(), emptyBorder);

        Border titledBorder = new TitledBorder(
View Full Code Here

    private void setUpControlComponent() {
        JLabel rateLabel = new JLabel("Rate:", JLabel.RIGHT);
        JPanel mainPanel = new JPanel();
        int GAP = 10;

        Border emptyBorder  = new EmptyBorder(GAP,GAP,GAP,GAP);

        Border etchedBorder = new CompoundBorder(
            new EtchedBorder(), emptyBorder);

        Border titledBorder = new TitledBorder(
View Full Code Here

    public AbstractGainButtonPanel() {
  GridLayout grid;
  setLayout(grid = new GridLayout(2, 1));
        grid.setVgap(0);
        grid.setHgap(0);
  setBorder(new EmptyBorder(0, 0, 0, 0));
  add(gainIncreaseButton = createGainIncreaseButton());
  add(gainDecreaseButton = createGainDecreaseButton());
    }
View Full Code Here

  desktop = new JDesktopPane();
  desktop.setLayout(new TileLayout());
  desktop.setBorder(tb = new TitledBorder(
        new CompoundBorder(
          new EtchedBorder(),
          new EmptyBorder(4, 4, 4, 4)),
        title));

  tb.setTitleColor(Color.black);
  desktop.setOpaque(false);
    desktop.setBackground(UIManager.getColor("control"));
View Full Code Here

  Debug.printObject("addScreen for " + title);
  int displayCount = 0;

        JPanel panel = new JPanel();
  panel.setLayout(new BorderLayout());
  panel.setBorder(new EmptyBorder(0, 0, 0, 0));
  if ((displayFlags & DISPLAY_VISUAL) != 0) {
      Component vc = player.getVisualComponent();
      if (vc != null) {
          panel.add(vc, BorderLayout.CENTER);
    displayCount++;
View Full Code Here

  this.min = min;
        this.max = max;
        this.tickIncrement = increment;
        this.size = size;
  labelFont = Font.decode("Courier-10");
  setBorder(new EmptyBorder(0, 0, 0, 0));
    }
View Full Code Here

TOP

Related Classes of javax.swing.border.EmptyBorder

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.