Package javax.swing

Examples of javax.swing.JComboBox.addItem()


        JComboBox types = new JComboBox();

        connTypes = ConnectionDialogCommon.getTypes();

        for (int i = 0; i < connTypes.length; i++) {
            types.addItem(connTypes[i][0]);
        }

        types.addItemListener(this);
        controls.add(types);
        controls.add(Box.createVerticalGlue());
View Full Code Here


          new OpenBrowserAction(websiteUrl).actionPerformed(e);
        }
      }
    });

    librariesComboBox.addItem("- select project -");
    final List<LicensedProject> licensedProjects = getLicensedProjects();
    for (LicensedProject licensedProject : licensedProjects) {
      librariesComboBox.addItem(licensedProject);
    }
View Full Code Here

    });

    librariesComboBox.addItem("- select project -");
    final List<LicensedProject> licensedProjects = getLicensedProjects();
    for (LicensedProject licensedProject : licensedProjects) {
      librariesComboBox.addItem(licensedProject);
    }

    final JToolBar toolBar = WidgetFactory.createToolBar();
    toolBar.add(DCLabel.dark("DataCleaners license: "));
    toolBar.add(dcLicenseButton);
View Full Code Here

    final JLabel label = new JLabel("Font");
    fontRow.add(label);
    final JComboBox fontList = new JComboBox();
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    for (String font : ge.getAvailableFontFamilyNames()) {
      fontList.addItem(font);
    }
    // Show the user what's in use at the moment
    String font = WtWindowManager.getInstance().getProperty(FONT_PROPERTY, DEFAULT_FONT);
    fontList.setSelectedItem(font);
    fontRow.add(fontList);
View Full Code Here

        //handle allowed value list
        if ( currentStateVar.getAllowedValues() != null) {
          String av[] = currentStateVar.getAllowedValues();
          JComboBox comboBox = new JComboBox();
          for (int j = 0; j < av.length; j++) {
            comboBox.addItem(av[j]);
          }
          values[i] = av[0]; //preset the first value from list
          table.setMyCellEditor(new DefaultCellEditor(comboBox),i);
        }
View Full Code Here

      morphTypeCmb.setSize(new Dimension(125, 22));
      morphTypeCmb.setFont(new Font("Dialog", Font.PLAIN, 10));
      boolean oldNoRefresh = noRefresh;
      try {
        noRefresh = true;
        morphTypeCmb.addItem(FlameMorphType.FADE);
        morphTypeCmb.addItem(FlameMorphType.MORPH);
      }
      finally {
        noRefresh = oldNoRefresh;
      }
View Full Code Here

      morphTypeCmb.setFont(new Font("Dialog", Font.PLAIN, 10));
      boolean oldNoRefresh = noRefresh;
      try {
        noRefresh = true;
        morphTypeCmb.addItem(FlameMorphType.FADE);
        morphTypeCmb.addItem(FlameMorphType.MORPH);
      }
      finally {
        noRefresh = oldNoRefresh;
      }
View Full Code Here

  }

  public void setUpSportColumn(TableColumn sportColumn) {
    // Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
View Full Code Here

  public void setUpSportColumn(TableColumn sportColumn) {
    // Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
View Full Code Here

  public void setUpSportColumn(TableColumn sportColumn) {
    // Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    // Set up tool tips for the sport cells.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.