Demos and Usage of javax.swing.Box.createVerticalStrut(int height)


   1: 
   2: import javax.swing.Box;
   3: import javax.swing.BoxLayout;
   4:         ...
   5:         } else {
   6:             Box inner = new Box(BoxLayout.Y_AXIS);
   7:             for (Component c : components) {
   8:         ...
   9:                 if (inner.getComponentCount() > 0)
  10:                     inner.add(Box.createVerticalStrut(5));
  11:                 inner.add(c);

View Full Code Here
   1: public class WebHunter extends JFrame implements ActionListener {
   2:   private Box centerPane;
   3:   private JTextField sourceFile;
   4:         ...
   5:    
   6:     centerPane.add(Box.createVerticalStrut(3));
   7:     centerPane.add(new JSeparator());
   8:         ...
   9:     centerPane.add(Box.createVerticalStrut(3));
  10:     centerPane.add(panel);
  11:         ...
  12:     centerPane.add(Box.createVerticalStrut(3));

View Full Code Here
   1: import javax.swing.BoxLayout;
   2: import javax.swing.Box;
   3: import javax.swing.ButtonGroup;
   4:         ...
   5: public class TryBoxLayout2 {
   6:   static JFrame aWindow = new JFrame("This is a Box Layout");
   7: 
   8:         ...
   9: 
  10:     Box left = Box.createVerticalBox();
  11:     radioGroup.add(rbutton = new JRadioButton("Green"));

View Full Code Here
   1: import javax.swing.BoxLayout;
   2: import javax.swing.Box;
   3: import javax.swing.ButtonGroup;
   4:         ...
   5: public class TryBoxLayout3 {
   6:   static JFrame aWindow = new JFrame("This is a Box Layout");
   7: 
   8:         ...
   9: 
  10:     Box left = Box.createVerticalBox();
  11:     radioGroup.add(rbutton = new JRadioButton("Green"));

View Full Code Here
   1: import javax.swing.JFrame;
   2: import javax.swing.Box;
   3: import javax.swing.JButton;
   4:         ...
   5:       vBox.add(button = new JButton("Button" + i));
   6:       vBox.add(Box.createVerticalGlue());
   7:     }
   8: 
   9:     getContentPane().add(vBox, BorderLayout.WEST);

View Full Code Here
   1:     buttonGroup.add(dhcp);
   2:     Box box = Box.createVerticalBox();
   3:         ...
   4:     box.add(dhcp);
   5:         ...
   6:     box.add(Box.createVerticalStrut(5));
   7:     bootp = new JRadioButton(

View Full Code Here
   1: 
   2:     Box bdown = Box.createVerticalBox();
   3:     fileChooser = new FileChooser[nFiles];
   4:         ...
   5: 
   6:     bdown.add(Box.createVerticalStrut(2));
   7:     for(int i=0;i < nFiles;i++)
   8:         ...
   9: 
  10:       bdown.add(Box.createVerticalStrut(2));  
  11:     }

View Full Code Here
   1: import javax.swing.AbstractListModel;
   2: import javax.swing.Box;
   3: import javax.swing.BoxLayout;
   4:         ...
   5:     public Component getComponent() {
   6:         Box domainBox = new Box(BoxLayout.PAGE_AXIS);
   7:         JLabel label = new JLabel(GanttLanguage.getInstance().getText(
   8:         ...
   9:         domainBox.add(label);
  10:         domainBox.add(Box.createVerticalStrut(5));
  11:         domainBox.add(roleSetsList);

View Full Code Here
   1: 
   2: import javax.swing.Box;
   3: import javax.swing.JButton;
   4:         ...
   5:     public void decorate(IUiDecor decor) {
   6:         Box box = Box.createVerticalBox();
   7:         box.add(new JLabel(" "));
   8:         ...
   9:         box.add(m_applyButton);
  10:         box.add(Box.createVerticalStrut(10));
  11:         box.add(m_resetButton);
  12:         ...
  13:         box.add(Box.createVerticalStrut(20));

View Full Code Here
   1: import javax.swing.BoxLayout;
   2: import javax.swing.Box;
   3: import javax.swing.ButtonGroup;
   4:         ...
   5: public class TryBoxLayout4 {
   6:   static JFrame aWindow = new JFrame("This is a Box Layout");
   7: 
   8:         ...
   9: 
  10:     Box left = Box.createVerticalBox();
  11:     radioGroup.add(rbutton = new JRadioButton("Green"));

View Full Code Here
   1: import javax.swing.ButtonGroup;
   2: import javax.swing.Box;
   3: import javax.swing.BoxLayout;
   4:         ...
   5: {
   6:   static JFrame aWindow = new JFrame("This is a Box Layout");
   7:   
   8:         ...
   9: 
  10:     Box left = Box.createVerticalBox();
  11:     radioGroup.add(rbutton = new JRadioButton("Green"));

View Full Code Here
   1: 
   2:         Box box = Box.createVerticalBox();
   3:         ...
   4:         box.add(objectPanel);
   5:         ...
   6:         box.add(Box.createVerticalStrut(3));
   7:         box.add(new JSeparator());
   8:         ...
   9:         box.add(Box.createVerticalStrut(3));

View Full Code Here
   1: 
   2:         Box box = new Box(BoxLayout.Y_AXIS);
   3:         for(int i = 0; i < threads.length; i++)
   4:         ...
   5:             if(i != 0)
   6:                 box.add(Box.createVerticalStrut(6));
   7: 
   8:             threads[i] = new ThreadProgress(i);
   9:             box.add(threads[i]);

View Full Code Here
   1: 
   2: import javax.swing.Box;
   3: import javax.swing.ButtonGroup;
   4:         ...
   5:     private Container getDocumentTypePanel() {
   6:         Box box = Box.createVerticalBox();
   7:         box.setBorder(IntegrationUiStyleSheet.getDefaultTitleBorder(resources.getString("Title.DocumentType")));
   8:         ...
   9:         box.add(flatOption);
  10:         box.add(Box.createVerticalStrut(10));
  11:         box.add(complexOption);
  12:         ...
  13:         box.add(delimitedOption);
  14:         box.add(Box.createVerticalStrut(10));

View Full Code Here
   1:     
   2:     Box box = Box.createVerticalBox();
   3:     
   4:         ...
   5:         c.setAlignmentX(Component.LEFT_ALIGNMENT);
   6:         box.add(c);
   7:         ...
   8:         box.add(Box.createVerticalStrut(10));
   9:         deleteTables = new JCheckBox(
  10:         ...
  11:         box.add(deleteTables);
  12:         box.add(Box.createVerticalStrut(10));

View Full Code Here