Package javax.swing

Examples of javax.swing.Box


    final ExpressionMappingTable table = createTable(owner);
    final JPanel pane = new JPanel(new BorderLayout());
    final ActionListener actionListener = listener; // make it visible for anonymous classes

    Box namePanel = Box.createHorizontalBox();
    final JTextField tfName = new JTextField(20);
    namePanel.add(new JLabel(resources.getString("MapperName:")));
    namePanel.add(Box.createHorizontalGlue());
    namePanel.add(tfName);
    tfName.setText((name==null) ? "" : name);
    if (listener!=null) pane.add(namePanel, BorderLayout.NORTH);
   
    Box leftPane = Box.createVerticalBox();
    leftPane.add(new JLabel(resources.getString("CurrentAssociations(double-clickToEdit)")));
    //Create the scroll pane and add the table to it.
    leftPane.add(new JScrollPane(table));
    pane.add(leftPane, BorderLayout.CENTER);

    final JButton newv, newi, del, up, down, ok;

    JPanel rightPane = new JPanel(new BorderLayout());
View Full Code Here


     */
    protected void createFootPane() {
        footPane = new JPanel(new BorderLayout());
        footPane.add(status = new JLabel(), BorderLayout.WEST);

        Box zoomPane = new  Box(BoxLayout.X_AXIS);
        zoomPane.add(new JLabel("Z:"));
        zoomPane.add(tfZoom = new JTextField());

        // Zoom text filed
        tfZoom.setPreferredSize(new Dimension(120, 20));
        tfZoom.setMaximumSize(new Dimension(120, 20));
        tfZoom.setMinimumSize(new Dimension(120, 20));
        tfZoom.addActionListener(this);

        // Zoom tool bar               
        JToolBar  zoomToolbar = new JToolBar();
        zoomToolbar.setRollover(true);
        zoomToolbar.setFloatable(false);
        zoomToolbar.add(aZoomIn);
        zoomToolbar.add(aZoomOut);

        zoomPane.add(zoomToolbar);


        zoomPane.add(new JPanel());

        footPane.add(zoomPane, BorderLayout.EAST);


        // Force the foot Pane height to 30 px
View Full Code Here

          ChartPropertyEditPanel panel = new ChartPropertyEditPanel(chart);
          JTabbedPane tab = findTab(panel);
          XYPlot plot = (XYPlot)chart.getXYPlot();
          PlotPanel plotPanel = new PlotPanel();
          Container c = (Container)plotPanel.getComponent(0);
          Box b = Box.createHorizontalBox();
          b.add(new JLabel(resources.getString("TransparencyCoefficient")));
          NumberField nfalpha;
          b.add(Box.createHorizontalGlue());
          b.add(nfalpha = new NumberField(plot.getForegroundAlpha()));
          c.add(b);
          b = Box.createHorizontalBox();
          JCheckBox cbDrawContour;
          b.add(cbDrawContour = new JCheckBox(resources.getString("OutlineEachSegment"), ((JSynopticAreaXYItemRenderer)plot.getRenderer()).isOutline()));
          b.add(Box.createHorizontalGlue());
          c.add(b);
          if (tab!=null) tab.add(plotPanel,0);
          int result = JOptionPane.showConfirmDialog(null, panel,
            resources.getString("ChartProperties"), JOptionPane.OK_CANCEL_OPTION,
            JOptionPane.PLAIN_MESSAGE);
View Full Code Here

        protected JTextField tfSeed;
       
        public OptionPanel() {
            setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
           
            Box box = Box.createHorizontalBox();
            box.add(new JLabel(param1Name()));
            box.add(Box.createHorizontalGlue());
            box.add(nfParam1 = new NumberField(0.0));
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(new JLabel(param2Name()));
            box.add(Box.createHorizontalGlue());
            box.add(nfParam2 = new NumberField(1.0));
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbStatic = new JRadioButton(resources.getString("static"),true));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            box = Box.createHorizontalBox();
            box.add(rbDynamic = new JRadioButton(resources.getString("dynamic"),false));
            box.add(Box.createHorizontalGlue());
            add(box);
           
            ButtonGroup bg = new ButtonGroup();
            bg.add(rbStatic);
            bg.add(rbDynamic);
           
            final JPanel cardPane = new JPanel(new CardLayout());
           
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("staticBufferLabel")));
            box.add(Box.createHorizontalGlue());
            box.add(nfSize = new NumberField(100,5));
            cardPane.add(box,"s");
           
            Box vbox = Box.createVerticalBox();
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("dynamicBufferLabel")));
            box.add(Box.createHorizontalGlue());
            box.add(nfDynamicSize = new NumberField(100,5));
            vbox.add(box);
            box = Box.createHorizontalBox();
            box.add(bufferLabel = new JLabel(resources.getString("period")));
            box.add(Box.createHorizontalGlue());
            box.add(tfPeriod = new JTextField("1000"));
            vbox.add(box);
            cardPane.add(vbox,"d");
           
            add(cardPane);
           
            rbDynamic.addChangeListener(new ChangeListener() {
View Full Code Here

    if(c!=null) add(c,BorderLayout.EAST);
    dialog=null;
  }

  protected JComponent createUpperContent() {
    Box box = Box.createHorizontalBox();
    box.setBorder(BorderFactory.createEtchedBorder());
    cbRotEnabled=resources.getCheckBox("cbRotEnabled",this);
    box.add(cbRotEnabled);
    box.add(Box.createHorizontalStrut(6));
    cbTransEnabled=resources.getCheckBox("cbTransEnabled",this);
    box.add(cbTransEnabled);
    box.add(Box.createHorizontalStrut(6));
    cbTransFirst=resources.getCheckBox("cbTransFirst",this);
    box.add(cbTransFirst);
   
    return box;
  }
View Full Code Here

        if (actionList.size()>0) currentAction = actionList.getAction(0);
        else currentAction = createNewAction();
       
        setLayout(new BorderLayout());

        Box box = Box.createHorizontalBox();
        box.add(new JLabel(resources.getString("Name")));
        box.add(Box.createHorizontalGlue());
        box.add(tfName = new JTextField(actionList.getName()));
        add(box, BorderLayout.NORTH);
       
        Box definitionBox = Box.createHorizontalBox();

        Box actionBox = Box.createVerticalBox();
        actionBox.setBorder(BorderFactory.createTitledBorder(resources.getString("ActionDefinition")));
        actionBox.add(cbxAction = new JComboBox());
        for (int i=0; i<AutomatonAction.NUMBER_OF_POSSIBLE_ACTIONS; ++i) {
          cbxAction.addItem(AutomatonAction.toString(i));
        }
        cbxAction.setEditable(false);
       
        cbxAction.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            currentAction.action = cbxAction.getSelectedIndex();
            setActionProperties();
          }
        });
       
        optionPanel = new JPanel(new CardLayout());

        // ---------- Text options -----------
        Box options = Box.createVerticalBox();
        options.add(Box.createVerticalGlue());

        box = Box.createHorizontalBox();
        box.add(rbFixedText = new ActionRadioButton(resources.getString("FixedText")) {
          public void stateChanged(ChangeEvent e) {
            if (rbFixedText.isSelected()) currentAction.option = new Object[] {new Integer(6), tfFixedText.getText()};
            else currentAction.option = new Object[] {new Integer(cbxformat.getSelectedIndex())};
            setActionProperties();
          }
        });
        box.add(Box.createHorizontalGlue());
        box.add(tfFixedText = new JTextField());
        tfFixedText.getDocument().addDocumentListener(new DocumentListener() {
          public void insertUpdate(DocumentEvent e) {
            currentAction.option = new Object[] {new Integer(6), tfFixedText.getText()};
            setActionProperties();
          }
          public void removeUpdate(DocumentEvent e) {
            currentAction.option = new Object[] {new Integer(6), tfFixedText.getText()};
            setActionProperties();
          }
          public void changedUpdate(DocumentEvent e) {
            currentAction.option = new Object[] {new Integer(6), tfFixedText.getText()};
            setActionProperties();
          }
        });
        options.add(box);

        box = Box.createHorizontalBox();
        box.add(rbUseSource = new JRadioButton(resources.getString("UseDataSourceValueAs")));
        box.add(Box.createHorizontalGlue());
        box.add(cbxformat = new JComboBox());
        cbxformat.addItem(resources.getString("String"));
        cbxformat.addItem(resources.getString("Decimal"));
        cbxformat.addItem(resources.getString("Scientific"));
        cbxformat.addItem(resources.getString("Hexadecimal"));
        cbxformat.addItem(resources.getString("Octal"));
        cbxformat.addItem(resources.getString("Binary"));
        cbxformat.setEditable(false);
        options.add(box);
       
        ButtonGroup bg = new ButtonGroup();
        bg.add(rbFixedText);
        bg.add(rbUseSource);

        box = Box.createHorizontalBox();
        box.add(lformatdigits = new JLabel(resources.getString("DecimalDigits")));
        box.add(Box.createHorizontalGlue());
        box.add(nfformat = new NumberField(3,3));
        nfformat.setColumns(3);
        nfformat.setHorizontalAlignment(JTextField.RIGHT);

        cbxformat.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            currentAction.option = new Object[] { new Integer(cbxformat.getSelectedIndex()) };
            setActionProperties();
          }
        });

        options.add(box);

        JPanel textOptions = new JPanel(new BorderLayout());
        textOptions.add(options, BorderLayout.NORTH);
        optionPanel.add(textOptions, "text");
       
        // ---------- Move options -----------

        options = Box.createVerticalBox();
        options.add(Box.createVerticalGlue());

        Box descPanel = Box.createHorizontalBox();
        descPanel.add(new JLabel(resources.getString("WhenReachingAnArrayEdge")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        descPanel = Box.createHorizontalBox();
        descPanel.add(rbDoNothing = new JRadioButton(resources.getString("DoNothing")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);
       
        descPanel = Box.createHorizontalBox();
        descPanel.add(rbWrap = new JRadioButton(resources.getString("WrapToOtherSide")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        descPanel = Box.createHorizontalBox();
        descPanel.add(rbExtend = new JRadioButton(resources.getString("ExtendArray")));
        descPanel.add(Box.createHorizontalGlue());
        options.add(descPanel);

        options.add(Box.createVerticalGlue());

        rbDoNothing.addChangeListener(new ChangeListener() {
View Full Code Here

    public PlotPanel() {
//      setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
      setLayout(new BorderLayout());

      JPanel panel;
      Box section;
     
      Box content = Box.createVerticalBox();
     
      setName(resources.getString("PlotProperties"));

      XYPlot plot = chart.getXYPlot();

      // Create the title section
      section=Box.createHorizontalBox();
      section.add(new JLabel(resources.getString("PlotTitle:")));
      section.add(tfTitle = new JTextField());
      tfTitle.setText(chart.getTitle().getText());
      content.add(section);


      // X axis section
      section = new Box(BoxLayout.Y_AXIS);
      section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("XAxis")));
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(pcbautox = new ActionCheckBox(resources.getString("Auto-update"), plot.getDomainAxis().isAutoRange()) {
        public void actionPerformed(ActionEvent e) {
          pcbfixedautox.setEnabled(isSelected());
          pcbfixedautox.apply();
          plpxmin.setEnabled(!isSelected());
          plpxmax.setEnabled(!isSelected());
          ptfpxmin.setEnabled(!isSelected());
          ptfpxmax.setEnabled(!isSelected());
        }
      });
      double autorange = plot.getDomainAxis().getFixedAutoRange();
      panel.add(pcbfixedautox = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          pnffixedautox.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(pnffixedautox = new NumberField(autorange,10));
      section.add(panel);
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(plpxmin = new JLabel(resources.getString("minLabel")));
      panel.add(ptfpxmin = new NumberField(10));
      ptfpxmin.setValue(plot.getDomainAxis().getLowerBound());
      panel.add(plpxmax = new JLabel(resources.getString("maxLabel")));
      panel.add(ptfpxmax = new NumberField(10));
      ptfpxmax.setValue(plot.getDomainAxis().getUpperBound());
      section.add(panel);
      pcbautox.apply();

      content.add(section);

//       X secondary axis section
      if (plot.getSecondaryDomainAxis(0) != null) {
        section = new Box(BoxLayout.Y_AXIS);
        section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("SecondaryXAxis")));
        panel = new JPanel();
        panel.setLayout(new FlowLayout(FlowLayout.LEFT));
        panel.add(scbautox = new ActionCheckBox(resources.getString("Auto-update"), plot.getSecondaryDomainAxis(0).isAutoRange()) {
          public void actionPerformed(ActionEvent e) {
            scbfixedautox.setEnabled(isSelected());
            scbfixedautox.apply();
            slpxmin.setEnabled(!isSelected());
            slpxmax.setEnabled(!isSelected());
            stfpxmin.setEnabled(!isSelected());
            stfpxmax.setEnabled(!isSelected());
          }
      });
      autorange = plot.getSecondaryDomainAxis(0).getFixedAutoRange();
      panel.add(scbfixedautox = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          snffixedautox.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(snffixedautox = new NumberField(autorange,10));
      section.add(panel);
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(slpxmin = new JLabel(resources.getString("minLabel")));
      panel.add(stfpxmin = new NumberField(10));
      stfpxmin.setValue(plot.getSecondaryDomainAxis(0).getLowerBound());
      panel.add(slpxmax = new JLabel(resources.getString("maxLabel")));
      panel.add(stfpxmax = new NumberField(10));
      stfpxmax.setValue(plot.getSecondaryDomainAxis(0).getUpperBound());
      section.add(panel);
      scbautox.apply();

      content.add(section);
      }
      // Now handle Y axis
      section = new Box(BoxLayout.Y_AXIS);
      section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("YAxis")));
      panel = new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.LEFT));
      panel.add(pcbautoy = new ActionCheckBox(resources.getString("Auto-update"), plot.getRangeAxis().isAutoRange()) {
        public void actionPerformed(ActionEvent e) {
          pcbfixedautoy.setEnabled(isSelected());
          pcbfixedautoy.apply();
          plpymin.setEnabled(!isSelected());
          plpymax.setEnabled(!isSelected());
          ptfpymin.setEnabled(!isSelected());
          ptfpymax.setEnabled(!isSelected());
        }
      });
      autorange = plot.getRangeAxis().getFixedAutoRange();
      panel.add(pcbfixedautoy = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
        public void actionPerformed(ActionEvent e) {
          pnffixedautoy.setEnabled(isSelected() && isEnabled());
        }
      });
      panel.add(pnffixedautoy = new NumberField(autorange,8));
      panel.add(plpymin = new JLabel(resources.getString("minLabel")));
      panel.add(ptfpymin = new NumberField(8));
      ptfpymin.setValue(plot.getRangeAxis().getLowerBound());
      panel.add(plpymax = new JLabel(resources.getString("maxLabel")));
      panel.add(ptfpymax = new NumberField(8));
      ptfpymax.setValue(plot.getRangeAxis().getUpperBound());
      section.add(panel);
      pcbautoy.apply();

      section.add(panel);

      Box box = Box.createHorizontalBox();

      box.add(new JLabel(resources.getString("Curves:")));
      box.add(pcbxcurves = new JComboBox());
      box.add(pcurvecolor = new JButton("    "));
      box.add(pcurvedelete = new JButton(resources.getString("Delete")));
      section.add(box);
      content.add(section);

      pcbxcurves.setEditable(true);
      noCurveColor = pcurvecolor.getBackground();
      pcurvecolor.setFocusPainted(false);
      SourceXYDataset dst = (SourceXYDataset)plot.getDataset();
      int n = dst.getSeriesCount();
      JSynopticXYItemRenderer renderer = (JSynopticXYItemRenderer)plot.getRenderer();
      for (int i=0; i<n; ++i) {
        DataSource ds = renderer.getDataSource(i);
        if (ds==null) {
          ds = dst.getYSource(i); // take the datasource associated with this curve by default
          DataSource linked = DataInfo.getLinkedSource(ds); // and follow link if necessary
          if (linked!=null) ds = linked;
        }
        pcbxcurves.addItem(new CbxEntry(i,dst.getSeriesName(i),(Color)renderer.getSeriesPaint(i),ds,renderer.getColorMapper(i)));
      }
      pcbxeditortf = (JTextField)pcbxcurves.getEditor().getEditorComponent();
      pupdateForEntry(pcbxcurves.getSelectedItem());
     
      pcbxcurves.addPopupMenuListener(new PopupMenuListener() {
        public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
          peditLocked = true;
        }
        public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
          peditLocked = false;
        }
        public void popupMenuCanceled(PopupMenuEvent e) {
          peditLocked = false;
        }
      });

      pcbxcurves.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          if (e.getStateChange()==ItemEvent.DESELECTED) pactiveEntry = null;
          else pupdateForEntry(e.getItem());
        }
      });

      pcbxeditortf.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateName();
        }
        public void removeUpdate(DocumentEvent e) {
          updateName();
        }
        public void changedUpdate(DocumentEvent e) {
          updateName();
        }
        public void updateName() {
          if ((peditLocked) || (pactiveEntry == null)) return;
          pactiveEntry.name = pcbxeditortf.getText();
        }
      });

      pcurvecolor.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if (pactiveEntry==null) return;
         
           DynamicColorChooser dialog = new DynamicColorChooser(
                              null, resources.getString("ChooseAColor"),null ,pactiveEntry.color,pactiveEntry.source,pactiveEntry.mapper);


                      dialog.pack();
                      dialog.setVisible(true);

                      if (dialog.isOk()){
                          pactiveEntry.color = dialog.getColor();
                          pactiveEntry.source = dialog.getSource();
                          pactiveEntry.mapper = dialog.getMapper();
                          pupdateForEntry(pactiveEntry);
                      }
        }
      });

      pcurvedelete.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          if (pactiveEntry==null) return;
          pcbxcurves.removeItem(pactiveEntry);
        }
      });

      // Now handle Secondary Y axis
      if (plot.getSecondaryRangeAxis(0) != null) {
        section = new Box(BoxLayout.Y_AXIS);
        section.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),resources.getString("SecondaryYAxis")));
        panel = new JPanel();
        panel.setLayout(new FlowLayout(FlowLayout.LEFT));
        panel.add(scbautoy = new ActionCheckBox(resources.getString("Auto-update"), plot.getSecondaryRangeAxis(0).isAutoRange()) {
          public void actionPerformed(ActionEvent e) {
            scbfixedautoy.setEnabled(isSelected());
            scbfixedautoy.apply();
            slpymin.setEnabled(!isSelected());
            slpymax.setEnabled(!isSelected());
            stfpymin.setEnabled(!isSelected());
            stfpymax.setEnabled(!isSelected());
          }
        });
        autorange = plot.getSecondaryRangeAxis(0).getFixedAutoRange();
        panel.add(scbfixedautoy = new ActionCheckBox(resources.getString("FixedRange"),autorange!=0) {
          public void actionPerformed(ActionEvent e) {
            snffixedautoy.setEnabled(isSelected() && isEnabled());
          }
        });
        panel.add(snffixedautoy = new NumberField(autorange,8));
        panel.add(slpymin = new JLabel(resources.getString("minLabel")));
        panel.add(stfpymin = new NumberField(8));
        stfpymin.setValue(plot.getSecondaryRangeAxis(0).getLowerBound());
        panel.add(slpymax = new JLabel(resources.getString("maxLabel")));
        panel.add(stfpymax = new NumberField(8));
        stfpymax.setValue(plot.getSecondaryRangeAxis(0).getUpperBound());
        section.add(panel);
        scbautoy.apply();
 
        section.add(panel);
 
        box = Box.createHorizontalBox();
 
        box.add(new JLabel(resources.getString("Curves:")));
        box.add(scbxcurves = new JComboBox());
        box.add(scurvecolor = new JButton("    "));
        box.add(scurvedelete = new JButton(resources.getString("Delete")));
        section.add(box);
        content.add(section);
 
        scbxcurves.setEditable(true);
        //noCurveColor = scurvecolor.getBackground();
View Full Code Here

      valuePanel.add(new JLabel(resources.getString("Value=")));
      valuePanel.add(theValue = new JTextField(10));
      valuePanel.setVisible(false);
      this.getContentPane().add(valuePanel);

      Box box;

      intervalPanel = Box.createVerticalBox();
      box = Box.createHorizontalBox();
      box.add(mincb = new ActionCheckBox(resources.getString("Min"), true) {
        public void actionPerformed(ActionEvent e) {
          minValue.setEnabled(isSelected());
          minInc.setEnabled(isSelected());
        }
      });
      box.add(minValue = new JTextField(10));
      minValue.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateType();
        }
        public void removeUpdate(DocumentEvent e) {
          updateType();
        }
        public void changedUpdate(DocumentEvent e) {
          updateType();
        }
      });
      box.add(minInc = new JCheckBox(resources.getString("BoundIncluded"), true));
      intervalPanel.add(box);

      box = Box.createHorizontalBox();
      box.add(maxcb = new ActionCheckBox(resources.getString("Max"), true) {
        public void actionPerformed(ActionEvent e) {
          maxValue.setEnabled(isSelected());
          maxInc.setEnabled(isSelected());
        }
      });
      box.add(maxValue = new JTextField(10));
      maxValue.getDocument().addDocumentListener(new DocumentListener() {
        public void insertUpdate(DocumentEvent e) {
          updateType();
        }
        public void removeUpdate(DocumentEvent e) {
          updateType();
        }
        public void changedUpdate(DocumentEvent e) {
          updateType();
        }
      });
      box.add(maxInc = new JCheckBox(resources.getString("BoundIncluded"), true));
      intervalPanel.add(box);
      intervalPanel.setVisible(false);
      this.getContentPane().add(intervalPanel);
      mincb.apply();
      maxcb.apply();

      box = Box.createHorizontalBox();
      box.add(Box.createHorizontalGlue());
      box.add(cancel = new JButton(resources.getString("Cancel")));
      box.add(ok = new JButton(resources.getString("OK")));

      this.getContentPane().add(box);
     
      ok.addActionListener(new ActionListener(){
        public void actionPerformed(ActionEvent e) {
View Full Code Here

    // Test Connection Button Panel (Both the button and the status label

    setFieldConstraints(gbc, 7);

    Box buttonBox = Box.createHorizontalBox();
    buttonBox.add(_testConnectionButton);
    buttonBox.add(Box.createHorizontalStrut(20));
    buttonBox.add(_testConnectionStatusLabel);
    _testConnectionButton.addActionListener(new TestConnectionButtonListener());
    pnl.add(buttonBox, gbc);

    // Separator
View Full Code Here

        controls.add(positionLabel = new JLabel("00:00:00"));
        //
        // On MacOSX, need a spacer so the window resize control is visible
        //
        if (Platform.isMac()) {
            Box spacer = Box.createHorizontalBox();
            spacer.add(Box.createHorizontalStrut(16));
            controls.add(spacer);
        }
        controls.setVisible(false);
       
        //
View Full Code Here

TOP

Related Classes of javax.swing.Box

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.